POPTÚN, Guatemala — The Guatemala military, once one of the most brutal and feared in Central America, is resurging to take on violent crime, forging closer ties with American troops and law enforcement even as worry over human rights abuses and corruption intensifies.

Those concerns deepened in recent weeks with the revelation of ties between former soldiers and drug gangs, and the fatal shooting of several indigenous demonstrators by soldiers on patrol with the police, an event critics of the militarized approach to policing seized on as an example of what can go wrong.

Allegations of corruption and killings by the military have also raised questions about the partnership with the American antidrug program here, just as the United Statesis reassessing its collaboration with security forces in neighboring Honduras after their role in several deadly episodes there.

“The army should take care of security of the country against attacks from a foreign power and never for citizen security,” said Francisco Dall’Anese, the former Costa Rica attorney general who now heads a United Nations commission investigating crime and corruption in Guatemala. He added, “When the military intervenes in conflicts of a civil nature, danger is increased without reaching solutions.”

Since the shooting of the demonstrators on Oct. 4 in Totonicapán, 60 miles northwest of Guatemala City, nine soldiers have been charged with “extrajudicial killing.” President Otto Pérez Molina, a former general, said the military would no longer be used to break up protests but stood behind his “mano dura,” or iron fist, approach to public safety that relies heavily on the military because the national police have failed to stem the country’s rampant violence, some of it fueled by drug trafficking and gangs.

His government is training and deploying more of its famed and feared special forces unit, known as the Kaibiles and for carrying out some of the worst abuses in this country’s civil war and ex-members’ ties to brutal criminal gangs. The government is also increasing military spending by nearly a quarter and making plans to open new bases near the Mexican border, where drug and organized crime gangs have gained a foothold.

At the same time, it is strengthening ties with the United States military.From August until last week, a contingent of American Marines operated from a Guatemalan base on the Pacific Coast as part of a 12-nation, American-led antidrug effort called Operation Martillo, or “Hammer,” aimed at disrupting the increased flow of South American cocaine along the Central American coastlines. The Marines flew helicopter missions to assist in the tracking of drug planes and boats and conducting training exercises.

With the United States antidrug program in the region an increasingly politically delicate topic, American officials did not allow reporters to observe or interview the American Marines during their two-month deployment in Guatemala, saying arrangements could not be made.

Still, American military officials said the collaboration with local forces is essential. Since January, when Operation Martillo began, the Defense Department said, it has led to the capture of 70 vessels, $15 million worth of marijuana and $2 billion worth of cocaine, though there are signs that the increased enforcement in Central America is pushing drug trafficking back to the Caribbean. American military personnel, working primarily with Guatemalan naval units, share intelligence and surveillance reports but do not carry out arrests or seizures, said Col. Michael W. Minor, the United States Southern Command officer who is the main architect of the mission.

But the deployment of the Guatemala military to fight crime, from patrolling the streets of the capital to mounting raids to capture drug traffickers, has worried human rights groups and lately some diplomats, who question the suitability of soldiers for police work.

They invoke the legacy of the military’s history of brutal repression during the 36-year civil war here, which ended in 1996; its long delays in turning in officers responsible for atrocities; and the role former Kaibiles have played in drug trafficking groups.

Former members of the unit helped form and train the Zetas, one of Mexico’s most notorious criminal gangs, Mexican and American officials have said. The prime suspect in the massacre of 27 peasants last year attributed to the Zetas — a crime that helped push the government to step up military patrols with the police — was a former Kaibil. Security analysts say the lure of big money from the crime groups could draw in more soldiers.The Kaibiles were behind the worst atrocity in the civil war, the slaughter of hundreds of people in the indigenous village of Dos Erres in 1982.

But military officials say the Kaibiles are the best force to confront well-armed drug gangs, many of them counting ex-soldiers in their ranks, and contend that only a relative few have turned out bad. The officials see the fierce reputation of the Kaibiles as a powerful deterrent to criminals, and they scoff that complaints from human rights groups are derived from outdated perceptions.

In September, American Marines conducted a training exercise with them, and they have been sent on overseas missions, including to Congo, where eight were killed in 2006 as part of United Nations peacekeepingefforts there. Guatemalan officials say these missions demonstrate the military’s improved professionalism.

“Society should evolve, not just the army but those organizations as well,” said Col. Erick Escobedo, a Kaibil who is the military’s spokesman. “We are not in the cold war. That operation is in the past.”Mr. Pérez Molina is a former Kaibil (a photograph of him in a military history book shows him as a young Kaibil gripping a large snake in a forest), as are the defense minister and the army chief of staff.

While Mr. Pérez Molina has made international headlines for calling for the decriminalization of drugs to help lessen the violence, he has not pushed the initiative at home. He has focused mainly on building up the military and forging closer ties with American law enforcement and military.

The United States suspended most military aid to Guatemala in 1990 because of human rights offenses during the war, in which 200,000 people were killed, but military training and joint missions have continued. “I am not intimate and familiar with what has gone on in the past,” Colonel Minor said. “But we stress human rights and doing the right thing.”

But watchdogs contend Guatemala’s military has little civilian oversight, with a history of intimidation squelching most complaints.

“When are they going to fortify the police so that we do not need the army in this?” said Helen Mack, founder of the Myrna Mack Foundation, named after her sister, who was killed by the military in 1990. “The wounds of the war are still there, and nobody is going to file a complaint against the soldiers for their abuses or wrongdoing.”

She and others worry most about the Kaibiles, who figure prominently in the ratcheting up of the military here, with plans to train some 200 more for the fight against criminal groups.

Named for a Mayan warrior, the Kaibiles take pride in their mysticism and secrecy. Their barracks at the base here are known as the “monastery” and are off-limits to everyone except Kaibiles. Their fearsome reputation comes in part from their survival, can-do-anything training, which includes consuming animals raw in the field — “food is not a delight, it is a fuel,” goes one of their sayings — and raising and killing a mascot, typically a dog.

They march and often train to the chant, “If I advance, follow me. If I stop, urge me on. If I retreat, kill me.”

“That is what made us famous in the world: no matter the cost, complete the mission,” said Maj. Gustavo Muñoz as he showed off a challenging, acrobatic obstacle course, the Kaibiles “hill of honor” commemorating their history, and other parts of the base outsiders are allowed to see.“We have the best training for confrontations,” he said. “The narcos are not trained for prolonged confrontations. They usually flee when they clash with us.”