Ogdenville's economy takes a tumble after tainted barley is discovered in Krusty's veggie burgers and the unemployed of Ogdenville flock to Springfield. When Mayor Quimby closes off the town's borders and enlists private citizens to help patrol them, Homer puts together a border patrol group.
Krusty Burger is proclaimed to serve the unhealthiest fast food in the country, so Krusty decides that his namesake restaurant should serve the "Mother Nature Burger," which is entirely vegetarian. Although the Springfield townsfolk initially devour the burgers, they soon fall ill with food poisoning. The illness is traced to tainted barley, which was grown in the neighboring town of Ogdenville. The residents of Ogdenville, who are descended from Norwegian settlers, are forced to abandon their town and seek employment in Springfield.
The residents of Springfield are initially hospitable to the displaced Ogdenvillians, and hire them as day laborers. Homer hires several Ogdenvillians to fix his roof, Marge hires a nanny named Inga to care for Bart, Lisa and Maggie, and Selma finds love with Thorbjørn, a brawny blond. Meanwhile, Bart wishes to establish his reputation as a star skateboarder after seeing a teenager from Ogdenville show off. While Bart's skateboard stunt is executed perfectly, it ends abruptly when he crashes into the side of a school bus and hurts his arm. Homer and Marge rush him to the hospital, but tension builds when they are forced to wait for hours because the waiting room is full of patients from Ogdenville. Furious, Marge, Homer and Bart return home, where Marge fixes Bart's arm herself. Homer storms off to Moe's Tavern, only to discover that Moe is serving aquavit and the bar is full of Ogdenvillians. Homer demands a mug of aquavit, unaware of its alcohol content, is instantly intoxicated, and subsequently loses his job at the nuclear power plant when he arrives at work drunk.
Mayor Quimby calls a town meeting, where it is decided that the Springfield border should be closed to residents of Ogdenville. Chief Wiggum and fellow officer Lou are unable to control the border themselves, so they distribute guns and beer to a group of vigilantes, among them Homer, Lenny and Carl. The group decides on the name "Star-Spangled Goofballs," and after several failed attempts to keep Ogdenvillians out of Springfield, decide to build a wall. At first, Marge believes the wall contradicts the values of tolerance that she taught their children, but changes her mind when Maggie utters the Norwegian word "ja" (meaning "yes"). The residents of Springfield begin building a massive wall and hire workers from Ogdenville to assist with its construction. As the building progresses, the residents of both communities discover that their similarities outweigh their differences. Once the wall is complete, the residents of both communities realize that they miss their neighbors, so the Ogdenvillians come back through a door they built in the wall to join a Springfield party.