Schoolgirls will meet the Duke of York after winning a national cyber security competition.

Four students from Royal Masonic School for girls in Rickmansworth beat more than 12,000 young women to come tip in the ‘CyberFirst Girls’ competition organised by the National Cyber Security Centre.

Alexa Wolff, Angelina Paz-King, Hattie Simpson and Laura Ferguson took part in a series of cyber challenges to win the final in Edinburgh and the chance to have tea with the Duke of York in May.

The competition aims to address gender imbalances in cyber security. In the final the students investigated a cyber incident and analysed a potential security breach.

RMS for Girls headmaster Kevin Carson said: “To encourage 12,000 young women to participate in this challenge is a fabulous thing in itself and for our RMS girls to have emerged victorious is a tremendous credit to Alexa, Angelina, Hattie and Laura.

“I could not be prouder of the girls or of their amazing teachers at our school.”

The Duke of York, who has shown his support for the competition, will invited the winners to celebrate their achievements at Windsor Castle next month.

NCSC deputy director for skills and growth Chris Ensor said: “Congratulations to all our finalists and in particular The Royal Masonic School for Girls, who performed impressively throughout the final.

“Young people are playing an increasing vital role in sharing knowledge about protecting ourselves online and the more who are engaged the better position we will all be in.”