President Enrique Pena Nieto on Tuesday proposed a reform that would allow some foreign agents to carry arms inside Mexico, a significant change in a country that has historically said the practice would violate its sovereignty.

The bill, sent to Mexico's Senate, would allow foreign customs and migration agents to carry guns in previously established zones. The main beneficiary would be the United States, which shares a long border with Mexico.

It would also allow foreign leaders or heads of state to enter the country with armed security details.

Mexican law currently prohibits any foreign agent or official from carrying weapons inside the country or participating in operations to arrest criminals. Authorities have always denied media reports of U.S. agents directly taking part in anti-drug trafficking operations inside Mexico.

Permits would be limited to revolvers or semi-automatic pistols with a caliber less than .40 and be granted by Mexico's national defense department. The initiative would demand reciprocity, implying that the foreign government would also allow Mexican agents to carry guns in its territory.

Officials say the presence of foreign agents in Mexico would speed up the joint inspection process and facilitate the flow of goods and people across borders. But they add that the foreign customs and migration agents may need guns to guarantee their security given the countries' problems with drug and human traffickers.

Some analysts think the law, if passed, could open the door to eventually allowing other U.S. security agencies, such as the Drug Enforcement Administration, to send armed agents into Mexico.