MEXICO CITY, Mexico — On a southern highway, Mexican police busted a record 513 foreign migrants crammed into two tractor trailers.

Across the country, Mexican soldiers rescued 180 migrants who were held for ransom. In a detention center, arrested migrants broke into a riot over poor conditions.

Mexico has long been a trampoline for migrants from around the world trying to bounce over the Rio Grande into the United States. Now Mexico's drug gangs have become increasingly involved in the human trafficking business while the nation's prisons and police are under increased pressure from the crime wave. Amid these conditions, the migrant issue has come to a boil in Mexico.

“Everyone round the world knows that Mexico is the back door into the United States. That causes a lot of problems here and now we are seeing those problems come to a head,” said a high-ranking official at Mexico’s National Immigration Institute, who asked his name not be used in case of repercussions from superiors.

Immigration officials estimate that more than 300,000 undocumented foreigners pour through Mexico each year to try to sneak over the southern U.S. border.

Most are from the Central American nations of Guatemala, El Salvador and Honduras, but there are migrants from all corners of the globe, including China, Iraq, Nigeria, Cuba and India.

The majority of travelers pay human smugglers to guide them through Mexico and into the United States, where many have family members and jobs waiting.

Those arrested in the two tractor trailers, which were busted in Chiapas state on May 17, said they each paid $7,000 for the ride in life-threatening conditions.

This generates an enormous human trafficking business, estimated to be worth more than $2 billion each year to Mexican gangs.

The ill-gotten gains spread dirty money around officials and mean more bounty for criminal groups to fight over.

In the last month, police have arrested dozens of officials from the National Immigration Institute for working with human traffickers.

Two officers in the southern state of Chiapas are accused of pimping Central American migrants out as prostitutes. Another six officers in the state of Tamaulipas, which borders Texas, are accused of selling migrants to drug cartels for $430 a victim.

“The immigration institute is so corrupt it is like a rotting corpse,” said migrant activist and Roman Catholic priest Alejandro Solalinde.

Drug cartels then hold migrants they can capture as hostages in safe houses until they extort $1,000 to $5,000 from their family members in the United States or back in their homelands.

Mexico’s National Human Rights Commission says last year there were a stunning 20,000 such kidnappings.

The horror came to world attention in August, when gangsters from the Zeta cartel massacred 72 migrants they had captured. The reasons for that massacre are still unclear.

The kidnappings and killings of migrants have sparked tensions between Mexico and its traditional friends in Central America.

While Honduras, Guatemala and El Salvador used to look to Mexico as a leader in defense of migrants, their governments have all issued recent complaints about the treatment of their citizens.

Mexican President Felipe Calderon said he was taking bold action to punish corrupt officials and protect migrants by signing a new immigration bill into law last week.

The law overhauls the immigration institute, limiting powers to imprison migrants and raising charges against corrupt officials.

“We know of hundreds of hundreds of heartbreaking stories of migrants who have been victims of corrupt (Mexican) authorities,” Calderon said as he signed the bill. “This law corrects what has been working badly.”

Mexico’s new law was hailed by many migrants activists as a positive, if small, step forward.

But tensions over the migrant issue continued to be high.

In the Chiapas city of Tapachula, 11 arrested migrants went on hunger strike after they were imprisoned for rioting.

On May 25, two of the hunger strikers, of Cuban nationality, were hospitalized with their lives in danger.

Calderon also warned that the while the United States failed to regulate its immigration, undocumented migrants would continue to pour through Mexico.

There are an estimated 11 million undocumented workers in the United States. About half of them are Mexican and the other half are from the rest of the world, but have often traveled through Mexico.

“We have been asking for years for the United States to decriminalize its migration and attend to the issue in a more sensible and sensitive way,” Calderon said.