Updated

President Martin Vizcarra rushed back to Peru from a foreign trip Tuesday to grapple with the attorney general's move to dismantle a team investigating the sweeping Odebrecht corruption case.

With hours left in the old year, Attorney General Pedro Chavarry removed two prosecutors leading the probe into high-ranking officials suspected of taking bribes from Brazilian construction giant Odebrecht.

His announcement set off street protests in the capital and other cities in Peru, and Vizcarra denounced the action from Brazil, where he had gone to attend the New Year's Day inauguration of President Jair Bolsonaro.

"We will not disappoint the population, especially in a year of consolidating our democracy in a fight against corruption," Vizcarra said upon returning.

The president said he was still deciding how to proceed to try to overturn Chavarry's action. He could ask a judge to suspend Chavarry from his role as attorney general, a position elected by Peru's five supreme prosecutors. Vizcarra also could ask congress to pass legislation declaring an emergency and removing Chavarry from office.

The investigation stems from the admission by Odebrecht, a giant Brazilian construction company, that it paid $800 million in bribes to officials across Latin America to win contracts. It said that included $29 million in Peru, where four past presidents have fallen under suspicion for possible links to the company.

Chavarry held a news conference Monday night to announce his decision, though he took no questions. He said he removed the team's chief prosecutor, Jose Domingo Perez, for questioning his election as attorney general and the team's fiscal coordinator, Rafael Vela, who had supported Perez.

Prosecutors in Peru are often viewed as corrupt bureaucrats, but Perez has drawn public favor for taking on the political elite, especially powerful opposition leader Keiko Fujimori, who has been imprisoned while she is under investigation.

Perez has accused Chavarry of taking steps to cover up investigations into the Odebrecht links of Fujimori and of former President Alan Garcia, both political allies of the attorney general.

In early December, Vela and Perez reached an agreement with Odebrecht executives who said they would deliver documents exposing bribes made to officials. Prosecutors say the evidence is key to their cases against Fujimori and Garcia.

Prosecutors also have publicly accused Chavarry of having ties with criminal organizations made up of magistrates and businessmen who bartered power for favors or money.

Chavarry's decision to dismantle the Odebrecht team sparked strong reaction from human rights groups.

The Inter-American Commission on Human Rights' executive secretary, Paulo Abrao, said on Twitter that "the decision by the attorney general of Peru must be justified to the public."

Transparency International called the move "a huge step backward in the fight against impunity in Peru" and urged the attorney general to reverse his decision.

Chavarry's announcement set off demonstrations late Monday by hundreds of people in Lima and at least three other cities. Protesters shouted phrases like "Out with Chavarry" as they waved Peruvian flags.