A former Filipino militiaman testified before the country's Senate on Thursday that President Rodrigo Duterte, when he was still a city mayor, ordered him and other members of a liquidation squad to kill criminals and opponents in gangland-style assaults that left about 1,000 dead.

Edgar Matobato, 57, told the nationally televised Senate committee hearing that he heard Duterte order some of the killings, and acknowledged that he himself carried out about 50 deadly assaults as an assassin, including a suspected kidnapper fed to a crocodile in 2007 in southern Davao del Sur province.

Rights groups have long accused Duterte of involvement in death squads, claims he has denied, even while engaging in tough talk in which he stated his approach to criminals was to "kill them all." Matobato is the first person to admit any role in such killings, and to directly implicate Duterte under oath in a public hearing.

The Senate committee inquiry was led by Sen. Leila de Lima, a staunch critic of Duterte's anti-drug campaign that has left more than 3,000 suspected drug users and dealers dead since he assumed the presidency in June. Duterte has accused de Lima of involvement in illegal drugs, alleging that she used to have a driver who took money from detained drug lords. She has denied the allegations.

Matobato said Duterte had once even issued an order to kill de Lima, when she chaired the Commission on Human Rights and was investigating the mayor's possible role in extrajudicial killings in 2009 in Davao. He said he and others were waiting to ambush de Lima but she did not go to a part of a hilly area — a suspected mass grave — where they were waiting to open fire.

"If you went inside the upper portion, we were already in ambush position," Matobato told de Lima. "It's good that you left."

The recent killings of suspected drug dealers have sparked concerns in the Philippines and among U.N. and U.S. officials, including President Barack Obama, who have urged Duterte's government to take steps to rapidly stop the killings and ensure his anti-drug war complies with human rights laws and the rule of law.

Duterte has rejected the criticisms, questioning the right of the U.N., the U.S. and Obama to raise human rights issues, when U.S. forces, for example, had massacred Muslims in the country's south in the early 1900s as part of a pacification campaign.

Matobato said under oath that the killings went on from 1988, when Duterte first became Davao city mayor, to 2013, when Matobato said he expressed his desire to leave the death squad. He said that prompted his colleagues to implicate him criminally in one killing to silence him.

"Our job was to kill criminals like drug pushers, rapists, snatchers. These are the kind we killed every day," Matobato said. But he said their targets were not only criminals but also opponents of Duterte and one of his sons, Paolo Duterte, who is now the vice mayor of Davao.

Presidential spokesman Martin Andanar rejected the allegations, saying government investigations into Duterte's time as mayor of Davao had already gone nowhere because of a lack of evidence and witnesses.

Philippine human rights officials and advocates have previously said potential witnesses refused to testify against Duterte when he was still mayor out of fear of being killed.

There was no immediate reaction from Duterte. Another Duterte spokesman, Ernesto Abella, said at a news conference that while Matobato "may sound credible, it is imperative that each and every one of us properly weigh whatever he said and respond right."

Matobato said the victims in Davao allegedly ranged from petty criminals to a wealthy businessman from central Cebu province who was killed in 2014 by a gunman in his office in Davao city, allegedly because of a feud with Paolo Duterte over a woman.

Other victims were a suspected foreign militant whom Matobato said he strangled, then chopped into pieces and buried in a quarry in 2002. Another was a radio commentator, Jun Pala, who was critical of Duterte and was killed by motorcycle-riding gunmen while walking home in 2003.

After a 1993 bombing of a Roman Catholic cathedral in Davao city, Matobato said Duterte ordered him and his colleagues to launch attacks on mosques in an apparent retaliation. He testified he hurled a grenade at one mosque but there were no casualties because the attacks were carried out when no one was praying.

Matobato said some of the squad's victims were shot and dumped on Davao streets or buried in three secret pits, while others were disposed of at sea with their stomachs cut open and their bodies tied to concrete blocks.

"They were killed like chickens," said Matobato, who added he that backed away from the killings after feeling guilty and entered a government witness-protection program.

He left the protection program when Duterte became president, fearing he would be killed, and said he decided to surface now "so the killings will stop."

Matobato's testimony set off a tense exchange between pro-Duterte and opposition senators.

Sen. Alan Peter Cayetano accused Matobato of being part of a plot to unseat Duterte. "I'm testing to see if you were brought here to bring down this government," he said.

De Lima eventually declared Cayetano "out of order" and ordered Senate security personnel to restrain him.

Another senator, former national police chief Panfilo Lacson, warned Matobato that his admissions that he was involved in killings could land him in jail.

"You can be jailed with your revelations," Lacson said. "You have no immunity."

Duterte has immunity from lawsuits as a president, but de Lima said that principle may have to be revisited now. "What if a leader is elected and turns out to be a mass murderer?" de Lima asked in a news conference after the tense Senate hearing.