All-female classes in cyber-skills are being set up by the GCHQ intelligence service, in an attempt to recruit a wider range of online security experts.
Almost 90% of the cyber-skills workforce worldwide is male, says GCHQ's cyber-defence arm, the National Cyber Security Centre (NCSC).
With warnings of serious skills shortages, the security services are worried about missing female recruits.
Chris Ensor of the NCSC says it needs to "address the imbalance".
There will be 600 free places on all-female CyberFirst Defenders courses in April and May this year, run as a mix of residential and non-residential training events.
The venues for the four-day courses will include Nottingham, Lancaster, Wrexham, Edinburgh and Oxfordshire.
The intention is to make cyber-skills lessons more open to teenage girls, in a field which has been accused of having a very male image, whether it is James Bond-style stereotypes or stock photos of teenage boys in hoodies.
All-female classes have been used in some schools as a way of building confidence in subjects once seen as being more male-dominated.
Aisling Brown, curriculum leader at the Stephen Perse Foundation school in Cambridge, said that teaching boys and girls separately in computing can help them with different ways of learning.
In computing classes, she said: "Girls are sometimes more reflective and take time to volunteer answers, while boys can tend to rush."
The school's computing club could tend to become dominated by the boys, she said, and they had to find ways to make it more accessible to girls.
It follows the CyberFirst Girls competition, launched last month, and run by the NCSC to promote computer skills and careers in cyber-security.
The agency wants more teenage girls to get involved, with questions designed to build skills in cryptography, cyber-security, logic and coding and networking.
It is part of a wider CyberFirst project aimed at raising cyber-skills in young people up to the age of 18.
The security services, needing talented staff to tackle the growing threat of cyber-attacks, have been concerned about recruiting from too small a pool of people with computer skills.
The lack of women in cyber-security is part of the bigger picture of women in science, technology, engineering and maths, says the NCSC.
The agency says about 35% of its overall staff are female and half of its senior leadership.
As well as wanting a better gender balance, the NCSC wants to attract applicants from a wider range of social backgrounds, from state as well as independent schools.
Among the schools taking part in the competition is the Tauheedul Islam Girls' High School, a Muslim state school in Blackburn which is among the highest-performing secondary schools in the country.
"Women are very under-represented in the global cyber-industry," said assistant principal, Asia Ali, who says she wants "exceptionally talented girls" to help make the country safer online.
The NCSC has warned of the scale of wide-ranging cyber-threats.
Already this month, the NCSC has highlighted threats to hack smart TV devices, cyber-attacks on information about German politicians and the theft of insurance and legal documents relating to the 9/11 attacks.
Mr Ensor, the agency's deputy director for skills and growth, said increasing numbers have been taking part in their training courses.
"However, women only make up a small proportion of the global cyber-workforce, and throughout GCHQ and the NCSC we are looking to address the imbalance."
He said he wanted to appeal to the "inquisitive instincts of young people".