The position of the coherent and incoherent domain of a chimera state in a ring of nonlocally coupled oscillators is strongly influenced by the initial conditions, making nontrivial the problem of confining them in a specific region of the structure. In this paper we propose the use of spatial pinning to induce a chimera state where the nodes belonging to one domain, either the coherent or the incoherent, are fixed by the control action. We design two different techniques according to the dynamics to be forced in the region of pinned nodes, and validate them on FitzHugh-Nagumo and Kuramoto oscillators. Furthermore, we introduce a suitable strategy to deal with the effects of finite size in small structures.