Torres announced his resignation in a letter to President Pedro Castillo on Wednesday, explaining his decision for “personal reasons” and wishing his “friend” success.
“I am resigning after serving alongside you, our homeland(s), especially the outcast and forgotten people,” Torres said in a letter he posted on Twitter.
Under Peruvian law, Castillo must accept or reject his resignation.
He accepted the role in February after former prime minister Hector Valer stepped down amid allegations of domestic violence against him.
Valer, who was in power for only four days, denied the allegations.
During a speech before Congress on the occasion of Peru’s National Day celebration on July 28, Castillo admitted he had made mistakes and said he was ready to cooperate with any investigation.
“I’m going to court to clear up allegations of due process, not media fairness, attributed to me,” Castillo said.
Under Peru’s constitution, an incumbent president can only be prosecuted on four counts: treason; preventing presidential, regional or local elections; dissolution of Congress; or blocking the work of the National Electoral Jury or other electoral bodies.