The film opens with an out-of-focus image of what appears to be a swarm of bugs crawling about. But as the image sharpens, schoolchildren are at play in, of all places, a cemetery. The setting is the isolated village of Wakely on the coast of England.
American mathematician David Sumner (Dustin Hoffman) is walking along a road while his newly acquired wife and one-time resident, Amy Sumner (Susan George), is parading braless and carrying a rather nasty-looking device called a 'mantrap'. David is introduced by Amy to Charlie Venner (Del Henney), an intense young man who is also an ex-lover of David's wife. David also meets two of Charlie's cousins named Janice Hedden (Sally Thomsett), and Bobby (Len Jones), her young brother.
As Janice and Bobby are putting the mantrap in the back of the car, David explains that he came to Wakely, on sabbatical, to write a treatise on celestial navigation. To ensure the peace and quiet needed to complete his book, David agrees to hire Charlie and a mate to help several workmen make repairs on his new home.
David enters the local pub, where he meets gruff bartender Harry Ware (Robert Keegan) and apologetically asks for any brand of American cigarettes they might have. As David makes way in the pub, Charlie discusses with Amy the possibility that she led him on in the old days with her taunting advances and was "begging for it". Amy, humiliated, retorts by spurning him. This is witnessed by David in the pub.
In the pub, David sees Janice's father and town patriarch Tom Hedden (Peter Vaughan), falling into an argument with Harry over a pint. Charlie tries to calm down his uncle. A fight ensues. A repentant Tom makes amends by paying for the American's cigarettes. But David turns down Tom's offer and exits the pub.
David and Amy are driving to their new cottage. They meet Norman Scutt (Ken Hutchison), who's busy fixing up their garage. While there, they also meet Chris Cawsey (Jim Norton), a giggling bloke who specializes in ridding the garage of rats. Chris and Norman are aware of the social turmoil and escalating violence of Vietnam-era American society, and that David somehow retreated to Wakely to escape his country's violence. They begin to challenge David, proving him to be spineless.
At home, David becomes intensely preoccupied with his research. He is verbally abusive to Amy and her cat, who's often missing. This angers his wife. At one point, she defaces his blackboard and changes his mathematical equations. David responds by saying, "what is this grammar school? Jesus Christ".
Meanwhile, David is helping his wife prepare for dinner when he sees Norman and Chris receiving a lift from friend and lorry driver Phil Riddaway (Donald Webster), a hulking presence who serves to round out the potentially menacing gang making life unpleasant for David.
Norman, Chris, and Phil meet at the pub with Tom and company, where Tom begins to suspect pedophile and one-time podiatrist Henry Niles (David Warner) of molesting young girls, including his own Janice. Tom insists that Henry's brother, John (Peter Arne), "keep a close watch on him".
David and Amy are getting ready for bed. The voyeuristic Janice spies on them. After a long night of lecturing and cheating antics, they retire for the night.
On the next day, Amy becomes increasingly incensed by David's neglectful ways. She soon finds herself being ogled at by the men working on her house (Charlie, Norman, and Chris). She complains of this to David, who suggests she "wear a bra". David continues to denote he left his country on a "grant to study". "You left because you didn't want to take a stand. Commit!", says Amy. David finalizes the argument by saying "we came here because you once told me that we could be happier". Frustrated, Amy parades topless in front of the workers outside.
The following day begins when Amy exclaims that her cat is missing. A frustrated David leaves the house, only to find himself terrorized by the workmen in Phil's lorry. On their way to the pub, they siphon their raging jealousy and contempt for the American academic by attempting to run his vehicle off the road.
Outside the pub, David notices Janice getting too close to Henry. He becomes flabbergasted by John's violent treatment towards his brother, as well as Bobby's caveman-like attitude towards his sister.
David enters the pub surrounded by his tormentors, who persist in jeering at him. There he meets local one-armed magistrate John Scott (T.P. McKenna), who informs of David's invitation to a church social the coming Thursday and accompanies him to the house where he meets Reverend Barny Hood (Colin Welland) and his wife.
Back in the house, David is introduced to Barny and his wife. The fatuous vicar is in awe of David's research and his study of "possible structures, interiors...radiation". David calls himself an "astro-mathematician". He goes on to assess the importance of his scientific findings and the impact of religion on the mounting violence and bloodshed inherent in all present societies. It is learned that David came to Wakely mainly to escape the violence which has become a part of everyday life.
Later that night, Amy's cat is found hanging in the closet. "To prove to you that they can get into your bedroom", in her estimation. Amy suspects Norman or Chris of killing her cat, while David states "it could've been anybody passing".
David is reluctant to confront the workers over Amy's cat. Instead, by having Charlie, Norman, and Chris set up the mantrap over by the fireplace, he agrees to go out hunting with them.
David accompanies Charlie, Norman, Chris, and Phil to the moors on a British version of "snipe hunt" where they keep him busy holding a sack open for the birds he believes will run into it. They spread about.
While David is gone, Amy is visited by Charlie, who has been seething with lust over her. Amy feels Charlie has some knowledge regarding her slain cat, but he promptly tries to seduce her. When she refuses, he forces himself on her. In the process, Norman eventually shows up at the house and threatens Charlie at gunpoint. Norman gleefully rapes Amy as well, while Charlie begrudgingly assists his friend in holding her down.
Amy doesn't tell David what happened. David tries to solve the problems in their marriage by "going back to the basics". He fires the four workers the next day. They "stuck it" to him on the moors, he explains.
In a moment of dis-consolation, he sits in the field staring at an indeterminate distance.
Some time later, the couple attend the local church function where the vicar Barny displays his penchant for magic tricks while the audience enjoys the show. Amy, haunted by memories of the rape, has a breakdown. As the show progresses, Janice approaches Henry. They leave the church and walk along the yard, as seen by Bobby. Bobby tells his father, Tom. The enraged Tom orders Bobby and John to find them. During this time, David and Amy have left the church as well. Tom, Charlie, Norman, Chris, and Phil visit the pub to learn of Henry's whereabouts. David, driving home in the dense fog, rescues Henry. Unbeknownst to David, Henry has just strangled Janice who was taunting him.
Amy, aware of Henry's pedophilic tendencies, doesn't want Henry in the house. David tries to call the magistrate at the pub and informs Harry the bartender of Henry. Tom and his four young allies learn of Henry's whereabouts and go to the house to do violence to Henry.
Since they "know the American", Charlie, Norman, and Chris ask for Tom and Phil to wait outside the house so they can find out where Janice is. David suddenly finds himself accosted by his three previous tormentors, two of whom raped Amy. David prevents them from hurting Henry, but Charlie says "We've come to get this bloody freak...With your cooperation or without it". As Henry proves unresponsive to their questioning, Charlie, Norman, and Chris agree to look for Janice until the doctor and police arrive.
Enraged by the lack of knowledge of his missing daughter, Tom attempts to open the "solid" door while his cronies start blasting David's windows. One of them, Charlie, yells "Look, you stupid yank. Let's have Niles before someone gets hurt." David hides Henry in the lavvy.
As the men lay siege to the house, what David says to Amy is key to understanding the situation. "This is where I live. This is me. I will not allow violence against this house." Moments later, the magistrate arrives to calm Tom and the others down but gets killed in the process. As accessories to a drunk who shot the sheriff, the men all decide to enter the house to get at Henry. Amy protests that David send Henry out, but he tries to keep them out of the house. He turns off the lights.
David uses every means and skill he knows to fight them off. He boils whiskey and even opens the mantrap. Amy tries to leave, but David stops her. Realizing that "they've gone too far to back down",
David suggests Amy be cooperative if they are to survive the night. Using such household items as a poker and wire, he succeeds at keeping the men out of the house at every turn.
As the relentless mob invade the house, David plays bagpipe music and decides to strike back. He squibs Tom's feet with gunfire. Tom later dies from his wounds. Phil climbs up the window, threatening to kill David. David dispatches him with a poker. Shortly thereafter, he turns on his living room light to find the knife-wielding Chris is inside the house. He beats the man to death with a poker. As Charlie prepares to shoot David, he is alarmed by Amy's screaming in her bedroom upstairs. Norman is trying to rape her. Charlie shoots him, and then finds himself fighting with David. David kills Charlie when he hits him over the head with the mantrap.
David is slightly taken aback by the carnage. "Jesus. I got 'em all", David exclaims. A seriously wounded Phil appears out of nowhere and wrestles David to the stairs. Completely exhausted, David orders Amy to get the gun. She gets the shotgun and shoots the thug dead. There's no simple way back from the violence into which David has wandered.
After the bloodbath, Amy stays in the house while David leaves with Henry. Henry complains "I don't know my way home", David replies, "That's okay. I don't either."