That led to the motion of impeachment.

The motion, on the grounds of “permanent moral incapability,” has been tested only once before — with Mr. Fujimori himself — but only after he had fled Peru for Japan and resigned from the presidency.

Mr. Fujimori, a hard-right authoritarian leader, was in power from 1990 to 2000 before being convicted on corruption and human rights abuses and sentenced to 25 years in prison. He has served 12 years, but he says that his health is deteriorating and that he should be pardoned.

Even from prison, though, he is still influencing politics, and his supporters, so-called Fujimoristas, have continued to dominate the legislature. Hector Becerril, a Popular Force member who voted for impeachment, said Mr. Fujimori urged members of his party, by phone, to cast votes of abstention and not vote in favor of the president’s removal.

During Thursday’s vote, details of Mr. Fujimori’s petition for a presidential pardon and release were also leaked to local news outlets. Some legislators speculated that Mr. Kuczynski made a deal with the Popular Force to pardon Mr. Fujimori in exchange for keeping him in office, a claim that the president’s party has denied.

Cesar Azabache, a lawyer and former state prosecutor, said that if Mr. Kuczynski pardoned Mr. Fujimori it would be a “moral failure.”

“If the discussion has been resolved by this exchange, it weakens the system in an extreme way,” Mr. Azabache said.

But even as the Popular Force wields immense power, the party appears fractured.

At its helm is Keiko Fujimori, Mr. Fujimori’s daughter, who is not a member of Congress, but who ran for the presidency in the last election and was ultimately defeated by Mr. Kuczynski by a few thousand votes. Her brother, Kenji Fujimori, was among the 10 Popular Force party members who cast votes of abstention, ultimately swaying the vote in favor of Mr. Kuczynski’s remaining in office.