The U.S. military has begun to work closely with Mexico's armed forces, sharing information and training soldiers in an expanding effort to help that country battle its violent drug cartels, according to U.S. and Mexican officials.

U.S. military officials have been hesitant to discuss publicly their growing ties with Mexico, for fear of triggering a backlash among a Mexican public wary of interference. But current and former officials say the U.S. military has instructed hundreds of Mexican officers in the past two years in subjects such as how to plan military operations, use intelligence to hunt traffickers and observe human rights.

The Pentagon's counternarcotics funding for Mexico has nearly tripled, from $12.2 million in 2008 to more than $34 million in 2010, according to estimates by the Government Accountability Office. While that is a small fraction of the Mexican anti-drug money provided by the State Department, the funding is significant because of the history of chilly relations between the two militaries.

Secretary of State Hillary Rodham Clinton recently reflected U.S. alarm over the Mexican cartels, saying that in some cases they were "morphing into or making common cause with what we would consider an insurgency." The comment was splashed across front pages in Mexico, and President Obama hastened to assure angry Mexicans that he did not characterize the traffickers as a rebel movement.

Even so, U.S. military officials see similarities with their own counterinsurgency efforts and are passing on to the Mexicans some of the techniques they have honed, such as analyzing intelligence to track down enemy fighters.

"We have tried to share many of the lessons we've learned in chasing terrorist organizations in Iraq and Afghanistan," said Gen. Victor Renuart, who recently retired as head of the U.S. military's Northern Command, which oversees the bilateral cooperation.

Mexico historically has been among the most reluctant countries in the hemisphere to cooperate with U.S. forces, in part because of lingering bitterness over invasions. Mexico still will not permit U.S. military trainers or advisers to deploy there full time.

But U.S. military officers are regularly traveling to Mexico to provide short courses for their Mexican counterparts, who then train their own personnel. In addition, more Mexicans are being trained at various U.S. military bases, officials say. The two sides' exchange of information has improved dramatically, officials say.

"The changes in the relationship between the Mexican military and the U.S. military are, I believe, historic," Renuart said.

The Obama administration is now considering what more it can do for Mexico's security forces.

"We've been directed by the president, at a very high level, to really think hard about how we can up our game, do more to support" the partnership with the Mexican government, said one senior U.S. official, speaking on the condition of anonymity to discuss internal deliberations.

One plan under consideration involves using $50 million in funds from the Pentagon's 2011 budget to improve security along Mexico's southern border, an important corridor for drugs, officials said.