I know that every finitely presented group can be realized as the fundamental group of a compact, connected, smooth manifold of dimension 4 (or higher). In dimension 2 there are strong restriction on the fundamental group of closed manifolds.
I wanted to know what happen in dimension 3: which are the conditions on a finitely presented group to be realized as the fundamental group of a closed (connected) 3-manifolds? I know there are strong restriction in dimension 3, but is there an "if and only if" characterization of fundamental groups of closed 3-manifolds? In affirmative case, can you suggest me some reference?