On an ordinary day, a brown bear strolls onto the streets of Springfield, frightening the town. The bear is eventually subdued by the police, who tranquilize it (despite the bear being relatively docile). Homer convinces Springfield that something needs to be done to protect them from bears, and the town takes their complaint to Mayor Quimby, who gives in easily. Soon, the Bear Patrol is created. Homer is then shocked to see taxes have been raised five dollars to maintain the patrol, and this warrants another visit by the town to the Mayor's office. To appease them, Mayor Quimby blames the high taxes on illegal immigrants. He then creates Proposition 24, which will require all illegal immigrants in Springfield to be deported.
Springfield starts to harass and hate all immigrants. At the Kwik-E-Mart, Apu confides in Homer that he is an illegal immigrant. Apu explains that if Proposition 24 passes, he will have to leave the United States, as his visa expired many years earlier. Apu is forced to go to Fat Tony to obtain a false United States citizenship, and on Fat Tony's advice, he starts acting American, by doing things like speaking with an American accent. However, feeling guilty and embarrassed about taking the fraudulent route and forging documents (Apu is shown remembering his parents bidding him farewell, telling him to "make us proud, son," as he set forth his journey to the USA, for his education and eventual Ph.D), he realizes he has disgraced his parents by turning his back on his Indian heritage, and tears up the fake passport.
After Homer sees how devastated was Apu about being deported, he changes his mind about the immigration proposition and vows that he and his family will help Apu. Lisa discovers that Apu will not have to leave if he can pass a United States citizenship test. Homer agrees to be Apu's tutor to help prepare for the exam. Apu demonstrates excellent knowledge of the United States, but Homer is a terrible tutor and replaces Apu's knowledge with false information. Apu falls asleep while studying Homer's notes, but forgets it all when he wakes up which Lisa says is good. Apu then goes to take the test, and because he originally knew a lot about the history of the United States, he passes the test and becomes a citizen of the United States. At a congratulatory party, Homer tells his guests how terrible it would be if immigrants were deported, explaining they make the United States thrive. He inspires them to vote no on Proposition 24, but it still passes, with 95% of voters voting yes. After the ballot is passed, the only person deported is Groundskeeper Willie.