The authors propose a two‐stage estimation procedure for the partially linear model Y = fo(T) + X'βo + ψ. They show how to estimate consistently the location of the nonzero components of βo. Their approach turns out to be compatible with minimax adaptive estimation of fo over Besov balls in the case of penalized least squares. Their proofs are based on a new type of oracle inequality.