A relational structure is a core, if all endomorphisms are embeddings. This notion is important for the classification of the computational complexity of constraint satisfaction problems. It is a fundamental fact that every finite structure S has a core, i.e., S has an endomorphism e such that the structure induced by e(S) is a core; moreover, the core is unique up to isomorphism.
We prove that this result remains valid for ω-categorical structures, and prove that every ω-categorical structure has a core, which is unique up to isomorphism, and which is again ω-categorical. We thus reduced the classification of the complexity of constraint satisfaction problems with ω-categorical templates to the classifiaction of constraint satisfaction problems where the templates are ω-categorical cores. If Γ contains all primitive positive definable relations, then the core of Γ admits quantifier elimination. We discuss further consequences for constraint satisfaction with ω-categorical templates.