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 world, so Krusty proclaims that his namesake restaurant should serve the "Mother Nature Burger," which is entirely vegetarian. Although the townspeople initially eat the burgers, they soon become ill with food poisoning. The illness is traced to tainted barley (caused by a rat caught in the grinder), 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 skates into the side of the school bus and injures his arm. Homer and Marge take Bart to the hospital, but tensions escalate when they are forced to wait for hours because the waiting room is filled with patients from Ogdenville. Irritated, Marge, Homer and Bart return home, where Marge straightens 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, becomes instantly intoxicated, and subsequently gets his employment terminated when he arrives at the nuclear plant drunk.
Mayor Quimby calls a town meeting, where it is agreed 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 chooses on the name "Star-Spangled Goofballs," and after several failed attempts to keep Ogdenvillians out of Springfield, plan 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 says 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 the 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. The episode finishes with the Springfieldians and Odenvillians having a dance party.