Gasoline plumed above a field close to a housing development in Tlajomulco, a town near Guadalajara, which is Mexico's second-largest city and the capital of Jalisco state.
The fuel did not catch fire, and crews were able to shut down the flow of gasoline in the pipeline, which was leaking about 150 yards (meters) from some homes. There were no reports of injuries.
"There's a lot of odour of gasoline in the entire area," Jalisco state Interior Secretary Arturo Zamora said, adding that the evacuation area was "approximately in a radius of 1 kilometre (half mile)."
On its Twitter account, the state-owned Petroleos Mexicanos oil company, known as Pemex, wrote that the leak "was caused by a clandestine tap."
Emergency personnel erected a sand-bag barrier around the leak to contain the gasoline and prevent it from contaminating more soil or entering storm drains. In 1992, gasoline leaked into Guadalajara's drains and ignited, effectively creating a bomb 6 miles (10 kilometres) long that demolished 1,000 homes and killed at least 210 people.
Pemex said it closed the nearest valves to isolate the leak and reduce pressure. Jalisco Gov. Aristoteles Sandoval said later that the leak "is now 100 per cent controlled."
"This was due to a fuel robbery, and we are going to go after the thieves" Sandoval said. "We have already detained several organized gangs" and "are calling on the public not to buy stolen gasoline, not to buy gasoline outside official gas stations."
On some Mexican highways, vendors known as "huachicoleros" stand under palm-frond shacks selling stolen gasoline or diesel to passing motorists.
"Clearly, organized crime is behind this," Sandoval said of the latest incident. He said investigators had found fuel containers in a nearby abandoned house.
Pemex has suffered a huge problem with illegal taps drilled into fuel pipelines. In July, the company said 1,421 illegal fuel taps were discovered in the first six months of this year, almost twice the 722 taps uncovered in the same period of 2012.
Experts say that given the skill and timing required to tap into high-pressure pipelines, it is likely thieves are getting advice and inside information, if not outright help, from people inside the company.
Pemex announced Wednesday that 39 company employees and nine subcontractor drivers of fuel delivery trucks had been arrested on suspicion of fuel theft in the neighbouring state of Guanajuato.
In a statement, Pemex said the drivers and Pemex employees were accused of falsifying weight measurements on loaded tanker trucks at a Pemex distribution facility in the city of Salamanca.
Prosecutors seized 10 tanker trucks, it said.Suggest a correction