1: \begin{abstract}
2: For a fixed odd prime $p$\, and a representation $\varrho$\, of the absolute
3: Galois group of $\Q$ into the projective group $\PGL_2(\F_p)$, we provide
4: the twisted modular curves whose rational points supply the quadratic
5: $\Q$-curves of degree $N$ prime to $p$ that realize $\varrho$ through the
6: Galois action on their \mbox{$p$-torsion} modules. The modular curve to twist
7: is either the fiber product of the modular curves $X_0(N)$ and $X(p)$ or
8: a certain quotient of Atkin-Lehner type, depending on the value of $N$
9: mod $p$. For our purposes, a special care must be taken in fixing
10: rational models for these modular curves and in studying their automorphisms.
11: By performing some genus computations, we obtain from Faltings' theorem
12: some finiteness results on the number of quadratic $\Q$-curves of a given
13: degree $N$ realizing $\varrho$.
14: \end{abstract}
15: