The Sharif family, however, is unlikely to lose its grip on power for long.
Shahid Khaqan Abbasi, who was elected by Parliament with a majority of 221 votes, is seen as a temporary placeholder for Shahbaz Sharif, the younger brother of Nawaz Sharif.
The Supreme Court ruled last week that Nawaz Sharif had been dishonest to Parliament and to the judicial system and was no longer fit for office. He stepped down, quickly selecting his brother to replace him.
Speaking after the vote, Abbasi denied he was only a temporary prime minister. "They say, 'Oh he's only here for 45 days.' I say I may be here for 45 days or 45 hours, but I'm not here to keep the seat warm," he told reporters.
"I intend to work and get some important things done if the cabinet supports me in this."
The younger Sharif, who is currently serving as the chief minister of Punjab, can't take office immediately as he isn't yet a member of Parliament.
He's expected to run in -- and win, handily -- a September by-election for the former prime minister's seat in Punjab, in a district loyal to his brother's Pakistan Muslim League-Nawaz (PML-N) party. The vote is similar to a special election in the United States.
Opposition leader Imran Khan, a cricketer-turned-politician, has criticized the nominations of Sharif and Abbasi, calling them both corrupt and called for cases of corruption against them to be reopened.
So, while Shahbaz Sharif waits to be elected to Parliament, in steps Abbasi.
He needed a simple majority, and as the PML-N, which nominated him, holds 188 of the Parliament's 342 seats, he was expected to win easily.
Following his confirmation, Abbasi will now nominate a cabinet, to replace the one that was dissolved on Friday by the courts.
Analysts say Abbassi, a party loyalist, is unlikely to object to a short-lived stint in the top job, with this kind of horse-trading common in Pakistani politics.
"He'll step up to the plate. He's a politician's politician," said Ahsan Butt, an assistant professor at the Schar School of Policy and Government, George Mason University in Virginia.
"(He's a) reliable character as far as the PML-N is concerned," added Butt.