  We use 2D particle-in-cell (PIC) plasma simulations to study electron
acceleration by electron temperature anisotropy instabilities, assuming
magnetic fields ($B$), electron densities ($n_e$) and temperatures ($T_e$)
typical of the top of contracting magnetic loops in solar flares. We focus on
the long-term effect of $T_{e,\perp} > T_{e,\parallel}$ instabilities by
driving the anisotropy growth during the whole simulation time ($T_{e,\perp}$
and $T_{e,\parallel}$ are the temperatures perpendicular and parallel to the
field). This is achieved by imposing a shear velocity, which amplifies the
field due to magnetic flux freezing, making $T_{e,\perp} > T_{e,\parallel}$ due
to electron magnetic moment conservation. We use the initial conditions: $T_e
\sim 52$ MK, and $B$ and $n_e$ such that the ratio between the electron
cyclotron and plasma frequencies $\omega_{ce}/\omega_{pe}=0.53$. When the
anisotropy becomes large enough, oblique, quasi-electrostatic (OQES) modes
grow, efficiently scattering the electrons and limiting their anisotropy. After
that, when $B$ has grown by a factor $\sim 2-3$ (corresponding to
$\omega_{ce}/\omega_{pe}\sim 1.2-1.5$), the unstable modes become dominated by
parallel, electromagnetic z (PEMZ) modes. In contrast to the OQES dominated
regime, the scattering by PEMZ modes is highly inelastic, producing significant
electron acceleration. When the field has grown by a final factor $\sim 4$, the
electron energy spectrum shows a nonthermal tail that resembles a power-law of
index $\sim$ 2.9, plus a high-energy bump reaching $\sim 300$ keV. Our results
suggest a critical role played by $\omega_{ce}/\omega_{pe}$ and $T_e$ in
determining the efficiency of electron acceleration by temperature anisotropy
instabilities in solar flares.
