In this article we develop the theory of residually finite rationally p (RFRp) groups, where p is a prime. We first prove a series of results about the structure of finitely generated RFRp groups (either for a single prime p, or for infinitely many primes), including torsion-freeness, a Tits alternative, and a restriction on the BNS invariant. Furthermore, we show that many groups which occur n...