How I Won the War is a 1967 British black comedy film starring Michael Crawford, Jack MacGowran, Roy Kinnear, Lee Montague, and John Lennon in his only non-musical acting role. The film, which was directed and produced by Richard Lester, is based upon the 1963 novel of the same name by Patrick Ryan.
 The film uses a variety of styles such as vignettes, straight-to-camera, and docu-drama to tell the tale of the fictional 3rd Troop, the 4th Musketeers and their misadventures through the Second World War. The screenplay takes a comic and absurdist attitude towards the conflict through the Western Desert Campaign in mid-late 1942 to the crossing of the last intact bridge on the Rhine at Remagen in early 1945.
 Lieutenant Goodbody is an inept, idealistic, naïve, and almost relentlessly jingoistic wartime-commissioned (not regular) officer. One of the main subversive themes in the film is the platoon's repeated attempts or temptations to kill or otherwise rid themselves of their complete liability of a commander.
 While Goodbody's ineptitude and attempts at derring-do lead to the gradual demise of the unit, he survives, together with the unit's persistent deserter and another of his charges who become confined to psychiatric care. Every time a character is killed, he is replaced by an actor in bright red, blue, or green-coloured Second World War uniform, whose face is also coloured and obscured so that he appears to be a living toy soldier. This reinforces Goodbody's repeated comparisons of war to playing a game.
 In writing the script, the author, Charles Wood, borrowed themes and dialogue from his surreal and bitterly dark (and banned) anti-war play Dingo. In particular the character of the spectral clown "Juniper" is closely modelled on the Camp Comic from the play, who likewise uses a blackly comic style to ridicule the fatuous glorification of war. Goodbody narrates the film retrospectively, more or less, while in conversation with his German officer captor, "Odlebog", at the Rhine bridgehead in 1945. From their duologue emerges another key source of subversion – the two officers are in fact united in their class attitudes and officer-status contempt for (and ignorance of) their men. While they admit that the question of the massacre of Jews might divide them, they equally admit that it is not of prime concern to either of them. Goodbody's jingoistic patriotism finally relents when he accepts his German counterpart's accusation of being, in principle, a Fascist. They then resolve to settle their disagreements on a commercial basis (Odlebog proposes selling Goodbody the last intact bridge over the Rhine; in the novel the bridge is identified as that at Remagen) which could be construed as a satire on unethical business practices and capitalism. This sequence also appears in the novel. Fascism amongst the British is previously mentioned when Gripweed (Lennon's character) is revealed to be a former follower of Oswald Mosley and the British Union of Fascists, though Colonel Grapple (played by Michael Hordern) sees nothing for Gripweed to be embarrassed about, stressing that "Fascism is something you grow out of". One monologue in the film concerns Musketeer Juniper's lament – while impersonating a high-ranked officer – about how officer material is drawn from the working and lower class, and not (as it used to be) from the feudal aristocracy.
 Lester decided to make several changes from the source material. For example, the novel does not have an absurdist/surrealist tone like the film. The novel represents a far more conservative, structured (though still comic) war memoir, told by a sarcastically naïve and puerile Lieutenant Goodbody in the first person. It follows an authentic chronology of the war consistent with one of the long-serving regular infantry units – for example of the 4th Infantry Division – such as the 2nd Royal Fusiliers, including (unlike the film) the campaigns in Italy and Greece. Rather than surrealism the novel offers some quite chillingly vivid accounts of Tunis and Cassino. Patrick Ryan served as an infantry and then a reconnaissance officer in the war. Throughout, the author's bitterness at the pointlessness of war, and the battle of class interests in the hierarchy, are common to the film, as are most of the characters (though the novel predictably includes many more than the film).
 In the novel, Patrick Ryan chose not to identify a real army unit. The officers chase wine and glory, the soldiers chase sex and evade the enemy. The model is a regular infantry regiment forced, in wartime, to accept temporarily commissioned officers like Goodbody into its number, as well as returning reservists called back into service. In both world wars this has provided a huge bone of contention for regular regiments, where the exclusive esprit de corps is highly valued and safeguarded. The name Musketeers recalls the Royal Fusiliers, but the later mention of the "Brigade of Musketeers" recalls the Brigade of Guards. In the film, the regiment is presented as a cavalry regiment (armoured with tanks or light armour, such as the half-tracks) that has been adapted to "an independent role as infantry". The platoon of the novel has become a troop, a Cavalry designation. None of these features come from the novel, such as the use of half-tracks and Transom's appointment as "corporal of musket", which suggests the cavalry rank corporal of horse. These aspects are most likely due to the screenwriter Charles Wood being a former regular army cavalryman.
 Filming took place during the autumn of 1966 in the German state of Lower Saxony, at the Bergen-Hohne Training Area, Verden an der Aller and Achim, as well as the Province of Almería in Spain. Lennon, taking a break from the Beatles, was asked by Lester to play Musketeer Gripweed.  To prepare for the role, Lennon had a haircut, contrasting sharply with his mop-top image. During filming, he started wearing round "granny" glasses (the same type of glasses worn by the film's screenwriter, Charles Wood); the glasses became iconic as the nearsighted Lennon mainly wore this particular style of glasses for the rest of his life. A photo of Lennon in character as Gripweed found its way into many print publications, including the front page of the first issue of Rolling Stone in November 1967. Beatles friend, and soon to be head of Apple Corps, Neil Aspinall has a cameo role as a soldier.
 During his stay in Almería, Lennon had rented a villa called Santa Isabel that he and wife Cynthia Lennon shared with both his co-star Michael Crawford and his then wife, Gabrielle Lewis. The villa's wrought-iron gates and surrounding lush vegetation bore a resemblance to Strawberry Field, a Salvation Army garden near Lennon's childhood home; it was this observation that inspired Lennon to write "Strawberry Fields Forever" while filming. The villa was later turned into the House of Cinema, a museum dedicated to the history of movie production in Almería province. A Spanish film, Living Is Easy with Eyes Closed (2013), revolves around the filming in Almería.
 From 28 to 29 December 1966, Lennon recorded all post-synchronisation work for his character at Twickenham Film Studios in London, England.
 The film's release was delayed by six months as Richard Lester went on to work on Petulia (1968) shortly after completing How I Won the War.
 The film holds a "rotten" 44% rating at the film review aggregator website Rotten Tomatoes, receiving 9 negative reviews out of 16. In his review for the film, Roger Ebert gave the movie two stars, describing it as "not a brave or outspoken film". John Simon called it "pretentious tomfoolery" and Monthly Film Bulletin felt "that Lester has bitten off more than he can chew".
 Stanley Kauffmann of The New Republic described How I Won the War as "the most ruthless mockery of the killer instinct and of patriotism that has ever reached the screen".