In this paper, 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 naturally in group theory, algebraic geometry, and in 3-manifold topology enjoy this residual property. We then prove a combination theorem for RFRp groups, which we use to study the boundary manifolds of algebraic curves ℂℙ2 and in ℂ2. We show that boundary manifolds of a large class of curves in ℂ2 (which includes all line arrangements) have RFRp fundamental groups, whereas boundary manifolds of curves in ℂℙ2 may fail to do so.