LIMA, Peru — Martín Vizcarra, who had been Peru’s first vice president and ambassador to Canada, was sworn in as the nation’s president on Friday afternoon, after Congress accepted the resignation of his predecessor, Pedro Pablo Kuczynski, who was brought down by scandals involving graft, vote-buying and a looming impeachment.
In his inaugural speech, Mr. Vizcarra said this was “a difficult moment” for the country.
“The time has come to say we’ve had enough,” Mr. Vizcarra said. “Any type of irregularity must be punished accordingly and justice must act with independence, responsibility and speed. But at the same time, what has happened must mark the end point of a policy of hatred and confrontation.”
Earlier Friday, 105 of 130 lawmakers voted to accept the letter of resignation that Mr. Kuczynski offered on Wednesday, in which he admitted no wrongdoing and accused lawmakers of obstructing his administration.
Legislators also passed a resolution, in which they said they “deplore and reject” the language that Mr. Kuczynski used to resign and held that “the current political crisis is the result of acts that the president himself has committed.”
Mr. Kuczynski’s resignation came a day before an impeachment hearing scheduled by Congress on the charge of “permanent moral incapacity.”
Mr. Vizcarra is an engineer and a former governor of the Moquegua region in southern Peru, and he was once part of Mr. Kuczynski’s cabinet, until Congress threatened to dismiss him and he resigned instead. He accepted a post as ambassador to Canada last September, saying his role as first vice president was “more about protocol than about executive action.” He arrived in Lima, the capital, shortly after midnight on Friday to assume the presidency, one day after turning 55.
He told reporters waiting at the airport that they should have “faith and optimism” and that “Peru always comes first.” But he has been mostly silent in the past few weeks as Mr. Kuczynski’s administration unraveled.
Several lawmakers have spoken highly of him in recent days and reiterated his need for a supportive legislature.
“We need to give Martín Vizcarra room to govern, just like we did before with Mr. Kuczynski,” said Congressman Héctor Becerril of the Popular Force party.
Still, he may have a hard time finding unwavering political allies. Mr. Vizcarra is not a member of Mr. Kuczynski’s party, Peruanos por el Kambio (Peruvians for Change), which was created by the former leader so that its initials, P.P.K., would match the initials of his name. (The correct spelling is cambio.)
But even if he were, the party holds a small minority of seats in Congress. Popular Force, a right-wing party controlled by the daughter of former President Alberto K. Fujimori, is the largest faction in Congress, and it played a decisive role in Mr. Kuczynski’s ouster.
Mr. Kuczynski had narrowly averted a previous impeachment effort last December, with the help of Mr. Fujimori’s son, but his support collapsed this week after tapes surfaced that appeared to discredit the son and his allies as they tried to mobilize support for Mr. Kuczynski.
“Martín Vizcarra’s government should be one of national unity that ends the confrontation between the executive and Parliament,” Congressman Gilbert Violeta, the party’s president and one of Mr. Kuczynski’s most loyal supporters, wrote in a post on Twitter. “We are all disgusted by national politics. We owe the country an apology.”
Mercedes Aráoz, who was the second vice president under Mr. Kuczynski, will remain in that role. She had been serving as prime minister since last year.
Mr. Vizcarra will need a prime minister to lead his cabinet. He may need to appoint members of the opposition Popular Force to his cabinet, to gain its support for legislation.
“I suppose he is going to build an administration of national coalition where surely he will assign a ministerial cabinet composed of different political parties,” said Congressman Carlos Tubino, a Popular Force member.
Minutes after Mr. Kuczynski’s resignation was accepted by Congress, the police removed fencing that had prevented cars from getting near his private home in the upscale district of San Isidro.
Prosecutors said they had started investigating tapes that showed key allies of Mr. Kuczynski appearing to entice a lawmaker to back the former president in an impeachment vote.
A judge has scheduled a hearing for Saturday at 10 a.m. to decide whether to bar Mr. Kuczynski from leaving the country, since he no longer has presidential immunity. Prosecutors are investigating accusations that he was involved in money-laundering activities.