His oath followed a parliamentary vote held a few hours earlier, where he won 211 votes. His contender, Mehtab Abbasi from the PML-N , an opposition party, received 89 votes.
Social media has been abuzz with puns and pokes ever since Ashraf was put forward as a potential candidate on Wednesday 20 June.
Ashraf, a PPP party loyalist and a good friend of the country's current President Asif Ali Zardari, was previously in charge of Pakistan’s widely unpopular Water and Power Ministry.
Abbas Nasir, a veteran Pakistani journalist tweeted :
@abbasnasir59 : Sorry PPP. Even if you only want to punish him via the impending disqualification for the loadshedding mess. Not Raja.
Pakistan has been suffering a grave power crisis. Forced power outages or ‘load-shedding’ has been in place ever since the current ruling party came into power in 2008. Controversial Rental Power Projects , which were supposed to meet Pakistan’s growing energy needs, have been at the center of the crisis and were recently banned by Pakistan's Supreme Court.
Playing off these projects, many Pakistanis started referring to the new prime minister as ‘Raja Rental’ on Twitter:
@Mahamali05:  Raja Rental takes oath as the new Prime (crime?) Minister of Pakistan
@shakirhusain : Hamid Mir showing clips of Raja Rental from 2008 where he says that in 2009 load shedding will be eradicated.
@tammyhaq : Yes he knows how to keep us in the dark “@jhaque_: I think Raja Pervez Ashraf is a fitting PM for #Pakistan”
Forced outages  last up to 18 hours a day in some urban areas and up to 22 hours in some rural areas. With temperatures soaring at 115F in parts of Pakistan, the power crisis has become the biggest woe for most Pakistanis.
But the PPP's chairman – President Asif Ali Zardari – had few choices of candidates to put forward for the post, after the former Prime Minister Yousaf Raza Gilani was disqualified  by the crusading Chief Justice of Pakistan earlier this week.
@khalidkhan787 : #PityTheNation which elects new PM #RajaRental but the strings controlled behind the scene by President Zardari
Gilani was disqualified for refusing to send a letter to the Swiss government requesting that they comply with Supreme Court orders to re-open graft cases against President Zardari. The 2013 elections are around the corner and Gilani only had a few more months in office. If he was not dismissed, he would have been the only democratically elected prime minister in Pakistan's history to complete a full term.
President Zardari first nominated  Makhdoom Shahabuddin, another controversial PPP politician for the post. But as soon as he filed his nomination papers, an arrest warrant was issued in his name. Shahabuddin, a former Health Minister, is at the center of a pharmaceutical scam investigation  in Pakistan.
Many believe that the Supreme Court will soon disqualify Ashraf  as well, after he refuses to comply with court orders, sparking another round of clashes between the country’s activist judiciary and this fragile civilian government. Islamabad-based journalist Omar Waraich, who writes for the Independent and Time, tweeted :
@OmarWaraich : When does the lease on Raja Rental's premiership run out?
Other commenters said:
@shahidsaeed: Everyone giving Raja 9-15-30 days, might be realistic based on your opinion on circumstances, but everyone gave Zardari 30-60-90 days too !!
@majorlyprofound: Pakistan has a rich tradition of democracy with many many Prime Ministers having served the country. Might be the first to reach 100.
Pakistan has had a rough democratic history. It has been under military rule for half its existence. In 64 years, the country has had 4 military rulers and 25 prime ministers, many of whom were dismissed following accusations of corruption.
While the military has often been accused of interfering in democratic processes in Pakistan, this time it seems to be an activist judiciary. Mohammad Hanif, a well-known Pakistani journalist and author, writes in the Guardian :
The military, indeed, sulking after a series of humiliations at home and abroad, is watching from the sidelines. Some would say it's even gloating at the prospect of civilian institutions cutting each other down to size, traditionally its job. There was a time in Pakistan when people joked: why hire a lawyer when you can buy a judge? Now you can't buy them because they are too busy shopping for a place in history.’