BOGOTA, Colombia -- Col. Hernán Mejía was among Colombia's most decorated officers, a young, strapping warrior with five medals for valor on his chest and a reputation for being a relentless adversary of the Marxist guerrillas who operated in the dusty hamlets of northeast Colombia.

But after disclosures that have astonished many Colombians, Mejía has been removed from his post, and the attorney general's office is investigating him for having worked with right-wing paramilitary groups to kill peasant farmers and guerrilla sympathizers. The allegations, announced by Defense Minister Juan Manuel Santos in January, mark the first time the military has turned over one of its own to civilian prosecutors on suspicion of collaborating with the death squads.

The Mejía case comes as this country -- a linchpin in an unstable region, and the Bush administration's closest ally in Latin America -- is undergoing an imperfect but remarkable judicial process that has produced nearly daily disclosures of ties between death squad leaders and Colombia's political and military establishment.

Human rights groups have long contended that the military has used paramilitary groups as a proxy force in its war on rebels, but the depth of those connections -- and the degree to which senior political and military officials are being prosecuted -- has shaken the country. The disclosures also have provided a glimmer of hope for a genuine catharsis in a country that has been enmeshed in conflict for decades.

"We think there's a real possibility that this may reach the point where it's irreversible," said Ivan Cepeda, leader of a victims' rights organization and son of Manuel Cepeda, a senator killed by paramilitary gunmen in 1994.

As part of a pact between the government and paramilitary leaders of the United Self-Defense Forces of Colombia, a group notorious for trafficking in cocaine and murdering peasants by the thousands, one of its top leaders, Salvatore Mancuso, has been providing riveting testimony to prosecutors about slayings he had ordered. There are also investigations by the attorney general's office and the Supreme Court. Along the way, Colombians have learned how a group of 11 congressmen and regional lawmakers signed a pact with paramilitary groups to "re-found the fatherland" and "build a new Colombia."

On Monday, the widening scandal cost the foreign minister, María Consuelo Araújo, her job. She resigned under intense public pressure after investigators arrested her brother, Sen. Álvaro Araújo, for suspected ties to the paramilitary groups. In all, eight congressmen are now jailed, and investigators have questioned dozens of other national and local lawmakers about suspected ties to death squads.

In recent weeks, largely through Mancuso's testimony, Colombians have learned how top military officers helped paramilitary commanders organize assassinations, even flying paramilitary fighters aboard army helicopters and providing them with weapons. Mancuso has coolly admitted to ordering more than 300 killings, outlined for prosecutors in a colorful PowerPoint presentation.

The attorney general's office is now investigating dozens of colonels, majors, captains and other army officers who are believed to have collaborated with paramilitary groups, said Leonardo Cabana, chief of the attorney general's human rights unit. "This is not the only investigation," Cabana said in an interview, referring to Mejía. "There exist more than 100 active cases where there are relations between the public security forces and illegal armed groups."

The government says the disclosures show that President Álvaro Uribe is serious about rooting out those with ties to the paramilitary groups.

"This is going to be the policy of the government for officers or officials who are in some way involved," Santos, the defense minister, said in a telephone interview. "The military man who commits these crimes is not a military man, but a criminal."

But Hector Abad, an author and political commentator here, says that this country, where even mass murder has largely gone unpunished, is still far from unraveling the whole truth. The attorney general's office has yet to go after generals long identified by human rights groups and opposition politicians as paramilitary collaborators. Even though Mancuso named generals and colonels in his testimony, all are now dead or in jail.

He has also said nothing of the so-called wise men, the cabal of civilian power brokers whom a former paramilitary leader, Carlos Castaño, identified as among the dark forces behind the paramilitary movement. Castaño, after writing a book detailing his role in founding the paramilitary groups, was murdered by his associates.

"The fact that they killed Carlos Castaño was because Castaño was going to talk, with Colombian and American justice," said Abad, whose father was killed by paramilitary gunmen in 1982. Abad said much of the onus is on the judiciary to ferret out how deep the paramilitary tentacles go.

"What we don't know is up to what point the paramilitaries will talk about it, and up to what point the judges, who are responsible for investigating, will be able to put together the puzzle," Abad said.

Investigating the paramilitary groups, or testifying about their operations, is still perilous. Shadowy gunmen believed to work for paramilitary commanders recently killed a handful of activists who were publicly pressing for the paramilitary groups to return stolen land and disclose their crimes. One was Yolanda Izquierdo, who had been at Mancuso's deposition.

"We confide in Colombian justice," she told The Washington Post the day Mancuso started testifying. A few weeks later, she was gunned down in front of her house.

What is different now, however, is that the paramilitary groups no longer enjoy the legitimacy they once had in some social sectors, thanks in part to the relentless news reports on abuses and the investigations by prosecutors.

"It's obviously positive that there's a housecleaning going on," said Adam Isacson, who closely tracks Colombia for the Center for International Policy, a Washington group. "It means the system is at least trying to kick into motion a little bit and starting to work."

The disclosures about Mejía and his role as commander of the army's Popa battalion in the city of Valledupar are significant, Defense Ministry officials say, because he was considered a rising star in Colombia's vast, U.S.-funded military. He had fought in some of the army's most tenacious campaigns against Marxist rebels and was assigned in 2002 to Cesar state, an important gateway for cocaine shipped to the United States.

To the surprise of veteran soldiers who could go months without killing a rebel, a 14-man team that Mejía headed always seemed to come back to the Popa base with the bodies of what the colonel claimed were dead guerrillas, according to a key witness who detailed the crimes to Semana magazine.

"As commander of the Popa battalion, what he was really doing was operating with members of this illegal group," said Cabana, referring to paramilitary death squads. "The operations that these paramilitary groups carried out were also carried out by the units he commanded."

No one seemed to suspect that Mejía, instead of going after guerrillas, was killing peasants and suspected rebel sympathizers. In one case celebrated in the press, he was said to have helped kill 19 rebels, making him something of a legend in the army. Instead, the 19 were paramilitary members whom Mejía had helped kill in a purge.

Investigators said they also later determined that Mejía was working closely with Rodrigo Tovar, known as Jorge 40, a powerful paramilitary commander in the region.

"The significant thing about him was he wasn't part of the Paleolithic, hard-core group in the military," said Isacson. "He seemed a modern officer who was a reformer. It didn't occur to people that he was having lunch with Jorge 40."