AbstractLet $F$ be a totally real number field and $A/F$ an abelian variety with real multiplication (RM) by the ring of integers $\mathcal {O}$ of a totally real field. Assuming $A$ admits an $\mathcal {O}$-linear 3-isogeny over $F$, we prove that a positive proportion of the quadratic twists $A_d$ have rank 0. If moreover $A$ is principally polarized and $III(A_d)$ is finite, then a positive proportion of $A_d$ have $\mathcal {O}$-rank $1$. Our proofs make use of the geometry-of-numbers methods from our previous work with Bhargava, Klagsbrun, and Lemke Oliver and develop them further in the case of RM. We quantify these results for $A/\mathbb {Q}$ of prime level, using Mazur’s study of the Eisenstein ideal. For example, suppose $p \equiv 10$ or $19 \pmod {27}$, and let $A$ be the unique optimal quotient of $J_0(p)$ with a rational point $P$ of order 3. We prove that at least $25\%$ of twists $A_d$ have rank 0 and the average $\mathcal {O}$-rank of $A_d(F)$ is at most 7/6. Using the presence of two different 3-isogenies in this case, we also prove that roughly $1/8$ of twists of the quotient $A/\langle P\rangle$ have nontrivial 3-torsion in their Tate–Shafarevich groups.