A scaling theory is developed for diffusion-limited cluster aggregation in a porous medium, where the primary particles and clusters stick irreversibly to the walls of the pore space as well as to each other. Three scaling regimes are predicted, connected by smooth crossovers. The first regime is at low primary particle concentrations where the primary particles stick individually to the walls. The second regime is at intermediate concentrations where clusters grow to a certain size, smaller than the pore size, then stick individually to the walls. The third regime is at high concentrations where the final state is a pore-space-filling network.