The Trade Federation upsets order in the Galactic Republic by blockading the planet Naboo in preparation for a full-scale invasion. The Republic's leader, Supreme Chancellor Finis Valorum, dispatches Jedi Master Qui-Gon Jinn and his apprentice, Obi-Wan Kenobi, to negotiate with Trade Federation Viceroy Nute Gunray. Darth Sidious, a Sith Lord and the Trade Federation's secret benefactor, orders the Viceroy to kill the Jedi and begin their invasion with an army of battle droids. The Jedi escape and flee to Naboo. During the invasion, Qui-Gon saves the life of a Gungan outcast, Jar Jar Binks, from being run over by a droid transport. Indebted to Qui-Gon, Jar Jar leads the Jedi to Otoh Gunga, an underwater city of Naboo. The Jedi try to persuade the Gungan leader, Boss Nass, to help the planet's surface dwellers but are unsuccessful. However, the Jedi manage to obtain Jar Jar's guidance and underwater transport to Theed, the capital city of Naboo. They rescue Naboo's queen, Padm� Amidala, and escape from the blockaded planet on her Royal Starship, intending to reach the Republic capital planet of Coruscant.
The ship is damaged as they pass the Federation blockade and the hyperdrive is caught in the crossfire, rendering it useless. They land for repairs on the outlying desert planet of Tatooine, situated beyond the Republic's jurisdiction. Qui-Gon, Jar Jar, astromech droid R2-D2, and Padm�disguised as one of her handmaidens�visit the settlement of Mos Espa to purchase equipment for their ship. They encounter the shop's owner, Watto, and his nine-year-old slave, Anakin Skywalker, a gifted pilot and engineer who has built a protocol droid, C-3PO. Qui-Gon senses a strong presence of the Force within Anakin, and is convinced that he is prophesied as "The Chosen One". Unable to acquire the required hyperdrive parts, Qui-Gon wagers both the hyperdrive and Anakin's freedom with Watto in a podrace. Anakin wins the race and joins the group to be trained as a Jedi, leaving behind his mother, Shmi. En route to their starship, Qui-Gon encounters Darth Maul, Sidious' apprentice, who intends to capture Padm�. A lightsaber duel ensues, but Qui-Gon quickly disengages and escapes onboard the starship.
Qui-Gon and Obi-Wan escort Padm� to Coruscant so that she can plead her people's case to Valorum and the Galactic Senate. Qui-Gon asks the Jedi Council for permission to train Anakin as a Jedi, but the Council refuses, concerned that Anakin is vulnerable to the dark side of the Force. Undaunted, Qui-Gon vows to take up Anakin as his new apprentice. Meanwhile, Naboo's Senator Palpatine persuades Amidala to call for a vote of no confidence in Chancellor Valorum to elect a more capable leader and to resolve the crisis. Though she is successful in pushing for the vote, Amidala grows frustrated with the corruption in the Senate and decides to return to Naboo. Qui-Gon and Obi-Wan are ordered by the Jedi Council to accompany the queen and investigate the return of the Sith, whom they had believed to be extinct.