The Stokes–Brinkman equations model flow in heterogeneous porous media by combining the Stokes and Darcy models of flow into a single system of equations. With suitable parameters, the equations can model either flow without detailed knowledge of the interface between the two regions. Thus, the Stokes–Brinkman equations provide an alternative to coupled Darcy–Stokes models. After a brief review of the Stokes–Brinkman problem and its discretization using Taylor–Hood finite elements, we present a residual-based a posteriori error estimate and use it to drive an adaptive mesh refinement process. We compare several strategies for the mesh refinement, and demonstrate its effectiveness by numerical experiments in both 2D and 3D.