Image caption Janet Hayward has promoted the use of technology in schools in Wales

Three UK teachers have made the final 50 in a competition to find the world's best teacher, with the winner to receive a prize of $1m (£670,000).

Teachers from London, Devon and the Vale of Glamorgan have reached the next stage of the Global Teacher Prize.

Last year's winner, Nancie Atwell from the United States, donated her prize money to her school.

Prime Minister David Cameron praised the UK teachers for the "tremendous achievement in being shortlisted".

The Global Teacher Prize, which will be awarded next March, was set up by the Varkey Foundation, the charitable arm of the Gems international education firm.

The three UK teachers are:

Colin Hegarty, Preston Manor School, Wembley, Greater London

Janet Hayward, Cadoxton Primary School, Barry, Vale of Glamorgan

Sean Bellamy, Sands School, Ashburton, Devon

Colin Hegarty is already a classroom prize-winner, having won last year in the UK's Pearson Teaching Awards or so-called "Platos".

Image caption Colin Hegarty, who won a UK teaching award last year, switched from accountancy to teach maths

He was labelled a "maths superstar" for his work in school.

Mr Hegarty initially worked for finance firm Deloitte, after getting a first class degree in maths at Oxford University. Mr Hegarty took a £40,000 pay cut to become a teacher and has set up a free website to help with maths.

Janet Hayward, a primary school head teacher, has promoted the use of technology and is chairwoman of the National Digital Learning Council in Wales. Last year, she was made an OBE for services to education.

Sean Bellamy runs an unconventional secondary school based on principles of "democratic education", where rules are decided collectively, there is no uniform, staff are paid the same, and everyone is on first-name terms.

He is now being consulted by South Korea's education ministry and South Korean academics interested in ideas about "emotional intelligence" and young people's mental health.

Image caption Sean Bellamy set up a school based on principles of "democratic education"

The aim of the competition is to raise the status of the teaching profession by focusing on the achievements of exceptional teachers.

Last year, there was one UK teacher in the final top 10, Richard Spencer from Middlesbrough, who took part in a glitzy final ceremony, with former US president Bill Clinton.

David Cameron said the teachers' prize was a "fantastic initiative" and sent his congratulations to the UK entrants.

Ban Ki-moon, secretary-general of the United Nations, is also supporting the project: "I count my teachers as among the most influential people in my life."