Wetherby Pond, headmaster of Nutbourne School, announces to his staff that he may be leaving the school after fifteen years, as he's been offered a job at the prestigious Harlingham School, conditional on a satisfactory governors' inspection.
The porter Rainbow is puzzled, as he's been sent 217 trunks (double the norm), half of which are addressed to St Swithin's School at the Nutbourne address. Pond rings the Schools Resettlement Department at Whitehall, but there's no-one there. He rallies the staff and tells them to prepare to put up 217 boys for one night. He orders the staff to share rooms, and says he'll set an example by sleeping with his opposite number.
But his opposite number is Miss Muriel Whitchurch, the no-nonsense head of St Swithin's School for Girls, who arrives with her staff while Pond and his colleagues are exploring the attic for spare accommodation space. She is surprised by the school motto, "Guard Thine Honour", and appalled to see billiards, guns and stuffed fish in the common room, not to mention decidedly racy literature.
Pond returns to his office to find Miss Whitchurch on the phone to the ministry, but the building is closed. Pond demands that the girls are sent home, but half of them are from the colonies. As the schoolgirls arrive, Pond's domestic staff walk out in protest. Miss Whitchurch suggests that her girls take over the cooking. The boys arrive, and start a pillow fight in the dormitory.
The next morning, one of the boys tries to send a sample of breakfast to his father, an analytical chemist, but this is intercepted when censorship of letters is introduced. The Ministry is successfully contacted, but responsibility is passed from desk to desk.
Lessons commence, but the girls' dance class is within sight of the boys' maths class, and rakish sports master Hyde-Brown takes an unhealthy interest in the girls' botany lesson. Miss Whitchurch asks Pond to tell his staff to leave the girls alone, and recommends dropping biology. Pond's own lesson is constantly interrupted, not least by a political canvasser. Pond says he'll vote for anyone male.
Pond rings the Ministry and threatens to go to the Commons to see his MP. He then hears that three sets of parents are coming to visit their daughters' school. Miss Whitchurch says that she knows the Harlingham governors and will speak to them if Pond doesn't co-operate.
While Pond leaves for the station, the Nutbourne staff keep the boys out of the way as the parents are shown round. They are surprised to see Hyde-Brown's pin-ups in the staff room cupboard. Miss Whitchurch says that they're swimming and Morris-dancing champions.
Pond arrives at the station and bumps into the Harlingham governors. He reluctantly returns, and while his staff look after the governors, he goes to see Miss Whitchurch. Out of the parents' earshot, she says the only solution is to ensure that they only see girls and the governors boys.
A complex system of signals is devised to co-ordinate rapid changeovers. There is an alarming moment when two of the parents quiz their daughter Angela, but they fail to recognise her innuendoes. Similarly, Pond is unnerved when one of his pupils, when asked to give an example of a mixed metaphor, constructs a sentence incorporating "skating on thin ice" and "playing with fire".
Things go smoothly until the governors ask for part of their tour to be dropped, which throws everything out of synchronisation. Everyone has to move faster, which causes slip-ups: Angela's parents are surprised to see her in two subsequent classes, while the governors find female underwear.
Finally, everything collapses when one of the governors leaves the tour to inspect the sports facilities on his own, and sees a pitched battle between rugby and lacrosse teams. He asks Pond for an explanation. Pond says he's trying to think of one.
A man from the Ministry comes to tell Pond that the St Swithin's girls will be replaced by pupils from "another co-educational school", coachloads of whom arrive immediately afterwards. Pond and Miss Whitchurch look on in despair as the school descends into total anarchy. She tells him there are good educational opportunities in Tanganyika.