The Equality Act 2010 makes it unlawful for an employer to treat a woman unfavourably during the 'protected period' because of her pregnancy.
It is also unlawful to treat her unfairly because of an illness related to pregnancy, or because she is on compulsory maternity leave, or because she has taken, or asked to take, ordinary or additional maternity leave.
The 'protected period' begins when you become pregnant. If you have the right to maternity leave, the protected period ends when your maternity leave ends, or when you return to work if this is earlier. All employees have the right to take maternity leave. If you do not have the right to maternity leave – for example, because you are not an employee – it ends two weeks after your child is born.
There are no exceptional circumstances in which an employer could lawfully justify pregnancy or maternity discrimination.