Prosecutors questioned Peruvian President Pedro Castillo for about three hours on Friday in a closed-door session, part of an investigation into alleged corruption by officials in his government.
The interrogation came despite a request by Castillo's lawyers to annul the investigation, arguing that sitting presidents have legal immunity during their five-year term under the South American country's constitution.
The case marks a rare instance of prosecutors questioning a sitting president for corruption.
"I'm an honest man and I will always defend my innocence and honor," Castillo wrote on Twitter after the proceeding, stressing that he has not committed any corrupt acts.
Prosecutors previously said they opted to investigate Castillo "due to the seriousness and degree" of accusations that his former transport minister, Juan Silva, engaged in corrupt acts that the president would know about.
Silva, who received offers from the prosecution to cooperate, is currently in hiding.
Upon leaving the prosecutor's office, Castillo briefly told reporters he answered all questions put to him.
"We are willing to continue responding, because Peru needs us to clarify things," he added.
The prosecution have not yet indicated whether Castillo will be recalled for further questioning.
The leftist president's government faces other corruption investigations plus social protests that have tanked his popularity after just 11 months in office.
At the end of March, Castillo overcame a second attempt by the opposition to impeach him, citing his "moral incapacity" to govern.
(Reporting by Marco Aquino; Writing by Isabel Woodford; Editing by David Alire Garcia and David Gregorio)