  In this paper we define and develop the theory of the cohomology of a
profinite group relative to a collection of closed subgroups. Having made the
relevant definitions we establish a robust theory of cup products and use this
theory to define profinite Poincar\'e duality pairs. We use the theory of
groups acting on profinite trees to give Mayer-Vietoris sequences, and apply
this to give results concerning decompositions of 3-manifold groups. Finally we
discuss the relationship between discrete duality pairs and profinite duality
pairs, culminating in the result that profinite completion of the fundamental
group of a compact aspherical 3-manifold is a profinite Poincar\'e duality
group relative to the profinite completions of the fundamental groups of its
boundary components.
