Can an employer stipulate an age limit for a job?

The use of upper or lower age limits in recruitment is unlawful under the Equality Act 2010, unless the age requirement can be objectively justified as a proportionate means of achieving a legitimate aim.