U.S. President Donald Trump's defense secretary plans this week to become the first Pentagon chief to travel to Mexico for its Independence Day activities, the Defense Department said on Tuesday, in a sign that defense ties are withstanding political tensions between the two countries.

U.S.-Mexican relations have been strained by Trump's threats to curtail trade with Latin America's No. 2 economy as well as his demand that Mexico pay for a border wall to keep out immigrants and drug traffickers.

Jim Mattis' planned trip on Friday would be only the fifth by a U.S. defense secretary to Mexico, said Pentagon spokesman Army Lieutenant Colonel Jamie Davis.

'Secretary Mattis' visit to Mexico reaffirms our commitment to the bilateral defense relationship and to the North America community,' Davis said.

Although Mexico's official Independence Day is on Sept. 16, most celebrations take place on Sept. 15. The event commemorates the launch of Mexico's war of independence from Spain in 1810.

The fact that Mattis would be visiting for such an important national event is itself notable.

Mexicans have a long memory of the Mexican-American War of 1846-1848, which led to Mexico's loss of almost half its territory to the United States. The war has long made U.S.-Mexican military cooperation a somewhat sensitive subject in Mexico.

The visit by Mattis also comes amid signs of improving U.S.-Mexican cooperation in cracking down on the heroin trade.

Reuters reported in April that Mexico's army was allowing the United States and the United Nations to observe opium poppy eradication.

The Mexican army took U.S. military officials on helicopter tours of half a dozen sites in Sinaloa and Chihuahua, two of the three states that along with Durango make up the Golden Triangle where most Mexican opium is produced, one of the sources said at the time.