Life moves by at HM Slade Prison on a day-to-day basis, with the usual antics of the various inmates becoming usual form. The newly-arrived and violent armed robber, Oakes (Barrie Rutter) approaches the Prison's 'Mr Big', (Genial) Harry Grout (Peter Vaughan), and using a cut from his last job before being caught, asks for his escape to be arranged. Grout sets the price, then begins making arrangements.
Grout starts by forcing Fletcher (Ronnie Barker) to persuade the prison Governor to allow an inmates-versus-celebrities football match, to boost prisoner morale and 'put Slade on the map'. Fletcher successfully manipulates new prison officer Mr Beale (Christopher Godwin) to make the suggestion to Senior Officer Mr Mackay (Fulton Mackay), who approaches the governor and is approved, although all three claim the idea was theirs alone. Fletcher then becomes the prison team's manager and Grout next insists that Oakes be on the team.
The celebrity team arrive in a coach. The prisoners are notably underwhelmed when it is explained that their hopes for one of The Goodies on the team have not been met, the nearest they have to a famous face being a weather presenter from Anglia Television (Duncan Preston). During the match, Oakes feigns an injury and is taken to the changing rooms where he meets the coach driver, revealed as an accomplice. They exchange clothes and Oakes ties the coach driver up to throw off any suspicion. Shortly afterwards, Godber (Richard Beckinsale) is concussed on the field so Fletcher takes him to the changing rooms, where he sees the ruse unfolding. Taking no chances, Oakes, now disguised as the coach driver, forces Fletcher and a dazed Godber into the coach's luggage compartment at gunpoint then drives out of the prison under the guise of topping up the fuel.
Further into the country, Oakes meets further accomplices and they drive Fletcher and Godber away in another vehicle. Meanwhile, the prison officers have discovered the escape and the police and the Home Office are informed, both searching for the coach, though the prison officers' attempt to help isn't well met with police, as no one can explain how they let three inmates drive out of the gates. Fletcher tells Oakes that they don't want to escape as he and Godber only have a short time left to serve, and that they won't tell anyone about Oakes plan because it's 'Them and Us'.
Oakes relents and releases them and they find a barn to hide in and catch their breath. They help themselves to some apples. Fletcher explains to Godber that there is no possible way that being caught outside ends well for them, as any policeman they approach will claim the find for himself. Furthermore, he realises that once the Governor, Mackay and Beale start passing the idea of the match back down the line, it'll end up with Fletcher looking like the responsible one and he'll serve more time, meaning the only solution is to break back into prison.
Making their way through fields and villages, they steal a sexton's bicycle, and manage to sneak back into the coach just as the police let the prison officers take it back to the prison. Once inside the prison walls, both convicts slip out of the coach and smuggle themselves into the prison officers' club storeroom, where Fletcher quickly consumes several bottles of alcohol to become inebriated enough to make their story pass: they stumbled on Oakes tying up the bus driver and he forced them down the delivery hatch, where they claim to have been since.
The story is believed by all, and life seems to return to normal. As the other inmates question Fletcher on what really happened, Grouty subtly tells him that he will be rewarded for his efforts and keeping his mouth shut. Later in their cell, Godber laments that Oakes got away, though Fletcher assures him that it won't matter: Oakes will hate being on the run. Fletcher reminds Godber that in a few months, he'll leave prison as well: the difference being he'll be free and clear.
Mr Mackay visits them and tells them that, while the Governor believes they have been locked in the storeroom all day, it doesn't explain the mysterious UFO Sightings in the village (Unidentified Fleeing Objects), and the various happenings they created on their journey. Realising he will never be believed, Mackay tells them that he will always be watching, and that his day will come. Fletcher and Godber cheekily munch on the stolen apples.
Ronnie Barker as Norman Stanley Fletcher
Richard Beckinsale as Lennie Godber
Fulton Mackay as Mackay
Brian Wilde as Barrowclough
Peter Vaughan as Grouty
Geoffrey Bayldon as Treadaway - Governor
Christopher Godwin as Beal
Barrie Rutter as Oakes
Daniel Peacock as Rudge
Sam Kelly as Warren
Julian Holloway as Bainbridge
Ken Jones as Ives
Philip Locke as Banyard
John Barrett as Hedley
Gorden Kaye as Dines (coach driver)
Karl Howman as Urquhart
Derek Deadman as Cooper
Tony Osoba as McClaren
Oliver Smith as McMillan
Zoot Money as Lotterby
Duncan Preston as the Weatherman
Jackie Pallo Jr as Jacko
based on the television series Porridge
released under the title Doing Time in the United States