An autopsy found the man had swallowed 246 packets of cocaine. (Representational)

A Japanese man with 246 packets of cocaine in his stomach and intestines died mid-flight on his way from Bogota to Tokyo, authorities said Monday in northern Mexico, where the plane made an emergency landing.

The 42-year-old man, identified only as Udo "N," began having a seizure after traveling from the Colombian capital to Mexico City and catching a connecting flight to Japan, said the prosecutor's office for the state of Sonora.

"Flight attendants noticed a person suffering convulsions, and requested permission to make an emergency landing in Hermosillo, Sonora," it said in a statement.

"When the plane landed at 2:25 am on Friday, paramedics boarded it and declared Udo 'N' deceased."

An autopsy found the man had swallowed 246 packets of cocaine, each measuring one by 2.5 centimeters (about one by one-third inch).

The cause of death was swelling of the brain caused by a drug overdose, said the statement.

The Aeromexico plane from Mexico City to Tokyo, which was carrying 198 other passengers, resumed its flight after the body was removed and international protocols were carried out, prosecutors said.

Transporting narcotics inside human "mules" is a popular smuggling tactic with drug cartels.