Outlaw Johnny Finger, better known as The Rumpo Kid (Sid James), rides into the frontier town of Stodge City, and immediately guns down three complete strangers, orders alcohol at the saloon—horrifying Judge Burke (Kenneth Williams), the teetotal Mayor of Stodge City—and kills the town’s sheriff, Albert Earp (Jon Pertwee). Rumpo then takes over the saloon, courting its former owner, the sharp-shooting Belle (Joan Sims), and turns the town into a base for thieves and cattle-rustlers.
In Washington DC, Englishman Marshal P. Knutt (Jim Dale), a “sanitation engineer first class”, arrives in America in the hope of revolutionising the American sewerage system. He accidentally walks into the office of the Commissioner, thinking it to be the Public Works Department, and is mistaken for a US Peace Marshal, and is promptly sent out to Stodge City.
The Rumpo Kid hears of the new Marshal, and tries all he can to kill the Marshal without being caught, including sending out a pack of Indians, led by their Chief Big Heap (Charles Hawtrey) and hanging the Marshal after framing him for cattle rustling. Knutt is saved by the prowess of Annie Oakley (Angela Douglas), who has arrived in Stodge to avenge Earp’s death and has taken a liking to Knutt.
Eventually, Knutt runs Rumpo out of town, but once Rumpo discovers that Knutt really is a sanitary engineer and not the Peace Marshal he once thought, he swears revenge, returning to Stodge City for a showdown at high noon. Knutt conceals himself from Rumpo’s gang in drainage tunnels beneath the main street, emerging momentarily from manholes to pick them off one by one. He does not capture Rumpo, who escapes town with the aid of Belle.