U.S. law enforcement agents and intelligence officers are working as advisers and helping their Mexican counterparts with investigations in full compliance with the law, Government Secretary Francisco Blake said.

"The work of international cooperation in security matters is done within the constitutional framework and under international treaties duly signed by the Mexican state," Blake said in a press conference after a meeting with lawmakers.

Blake, Foreign Relations Secretary Patricia Espinosa and federal security spokesman Alejandro Poire appeared before the Bicameral Congressional Security Committee on Wednesday to discuss the controversial matter.

The New York Times reported last week that 24 Central Intelligence Agency officers and U.S. Drug Enforcement Administration agents were assisting with investigations and training Mexican personnel to fight drug trafficking and organized crime.

The United States has expanded its support and intelligence-sharing operations in Mexico, targeting criminal organizations, the U.S. State Department said.

"The participation of foreign officials in our country does not authorize them to carry out tasks reserved for the Mexican government or to engage in acts of authority on Mexican territory," Blake told reporters.

The officials did not tell lawmakers how many U.S. personnel are in the country, but they confirmed that the Americans have "diplomatic status and immunity," under the terms of bilateral treaties, Senate Security Committee chairman Sen. Ricardo Arce said.

"They do not take part in operational functions, just in investigations and technical advisement, so they do not violate the laws of the country," Arce said.

The hearing was held behind closed doors for security reasons, officials said.

The presence of U.S. personnel in Mexico has drawn criticism from various quarters.

Last week, prominent poet and peace activist Javier Sicilia called on the government to explain the presence of the CIA and DEA personnel in Mexico.

The presence of the CIA and the DEA is "illegal and unacceptable," the poet said, adding that it represented a clear violation of Mexico's sovereignty.

Sicilia also slammed the Mexican government's contention that the U.S. agents' presence stems from bilateral cooperation agreements and fully adheres to the nation's laws.

"The U.S. government's incursion into our country is humiliating for Mexican army (soldiers) who have been assigned law-enforcement duties," the activist said.

President Felipe Calderon militarized the struggle against Mexico's drug cartels after taking office in December 2006, deploying tens of thousands of Federal Police officers and army soldiers to drug-war hotspots.

The president contends that federal forces must have the lead role because municipal and state police are ill-prepared to battle the well-funded, heavily armed drug cartels and easily corrupted by the mobs, but critics in Mexico and abroad say the deployment has led to a sharp rise in human rights violations.