Soldiers chasing suspicious vehicles on a highway in Mexico opened fire and killed six migrants. [AFP]

Soldiers chasing suspicious vehicles on a highway in Mexico opened fire and killed six migrants, the Defence Ministry said Wednesday.

The patrol found 33 migrants from countries including Egypt, Nepal, Cuba, India and Pakistan, it said, without specifying the nationalities of those killed in the incident late Tuesday in southern Chiapas state.

The killing happened on the same day that Claudia Sheinbaum took office as Mexico's new president with a vow to respect human rights and avoid repression by security forces.

The two soldiers who opened fire have been removed from their duties pending an investigation, according to a statement.

It said the patrol saw a vehicle -- followed by two flatbed trucks like those used by criminals -- traveling at high speed and apparently attempting to flee.

"Military personnel reported hearing gunshots, so two soldiers activated their weapons, stopping one of the flatbed trucks," the statement said.

Four of the migrants died at the scene while two of the 12 injured lost their lives at the hospital, it added.

The 17 migrants who were unharmed were handed over to the immigration authorities, the statement said.

According to a police report, soldiers chased a truck after it failed to stop at an army checkpoint, firing gunshots to try to stop it.

The driver turned off down a dirt road in an attempt to escape, but lost control of the vehicle, it said.

Thousands of migrants from many countries travel through Mexico each year in buses, overcrowded trailers and atop freight trains in an attempt to reach the US-Mexican border.

They run the risk of fatal accidents, kidnapping by criminal groups and extortion by corrupt officials.

In December 2021, 56 mostly Central American migrants were killed and dozens injured when a people smugglers' truck carrying around 160 people overturned in Chiapas.

More than 9,800 migrants have died or disappeared in the Americas since 2014, most of them while trying to reach the United States via Mexico, according to the International Organization for Migration.

In March 2023, 40 migrants died in a blaze at a detention center in the border city of Ciudad Juarez started by a detainee who set fire to the mattress in his cell.

Security camera footage showed that once the fire broke out, neither immigration nor security personnel attempted to evacuate the migrants.

In recent years, Mexico has given an increased public security role to its military, which Amnesty International in April accused of using "unnecessary and excessive force."