The snap election was called by Prime Minister May, who said she wanted to strengthen her mandate in negotiations with the EU.
Labour focused its campaign on domestic issues such as health and education.
But the campaign quickly switched to a debate about national security, following the attacks in Manchester and London.
Al Jazeera's UK correspondent Barnaby Phillips looks back at the seven-week campaign.
- Subscribe to our channel: http://aje.io/AJSubscribe
- Follow us on Twitter: https://twitter.com/AJEnglish
- Find us on Facebook: https://www.facebook.com/aljazeera
- Check our website: http://www.aljazeera.com/