Set during the Second World War the story follows six children living in the fictional town of Garmouth which regularly suffers bombing raids by the German Luftwaffe. When Chas McGill finds a crashed German Heinkel 111 bomber he removes a fully operational machine gun and over 2000 rounds of ammunition. With the help of his friends, Cyril, Clogger, Carrot Juice, Audrey and Ben they set up their own den called "Fortress Caporetto", named after a World War I battle in which Chas's grandfather fought.
Later a bomb lands on Nicky's house and he is presumed dead but actually survives and hides in the fortress, where he is found by the gang. After this, only his friends know he is alive and Clogger leaves his home and joins him.
During an attack by an Me 110 fighter, the children fire their gun at the plane. They miss but the plane is shot down. The pilot is killed but the rear gunner, Rudi Gerlath, bails out. He discovers the children's hidden fortress and is promptly detained by the children, who take his pistol, even though their machine gun is damaged and inoperable.
The children do not hand the German over to the authorities, but keep him prisoner at their fort. The children bribe the German with the offer of a boat if he will repair their machine gun. He agrees and mends it before being taken to the dock where he rows off. The same night the church bells ring signalling a German invasion. The children hurry to the fortress but do not see anything; it was a false alarm. Out at sea, the German finds he does not have the strength to row to German-occupied Norway and is forced back to England and rejoins the children at the fortress.
The next day it is realised that the children are missing, and some Polish refugee soldiers are drafted in to look for them. The children, on hearing troops speak in a foreign language, open fire on them with the gun, believing they are a German invasion force. The children are soon overpowered, however, and forced to surrender. In the chaos, Clogger shoots and wounds the German with his own Luger pistol.
The very well-made fortress is surrendered to the Home Guard, then Clogger and Nicky are taken to a children's home while the other children are handed over to their parents.