Imran Khan was uncharacteristically absent from on Sundayas it became clear that his Pakistan Tehreek-e-Insaf party (PTI) had failed to make the huge gains he had promised his followers.

Khan, who is still recovering in hospital after a serious fall at a campaign rally last week, broke his silence 17 hours after Nawaz Sharif had claimed victory.

"I congratulate the entire nation for taking part in such a massive democratic process," he said in a video message. "We are moving forward on the path of democracy."

But he said his party would formally complain about vote rigging, which some of his followers have blamed for robbing them of the sweeping victory they thought was inevitable.

Nevertheless, the 30 seats the PTI is projected to get is a remarkable breakthrough for a party that has only ever won one seat in parliament before.

Khan has also been credited with politicising many of Pakistan's vast number of young people and encouraging them to vote in an electrifying election with one of the highest turnouts in Pakistan's history.

He also looked set to form a government in Khyber Pakhtunkhwa, one of Pakistan's four provinces, and become the leader of the opposition in parliament after beating the ousted Pakistan People's party (PPP) into third place.

However, expectations had been higher among his supporters, particularly after news channels hyped the chances of winning enough seats to hold the balance of power in a hung parliament.

Compounding the sense of disappointment at this failure was the news that he had not got elected in Lahore, capital of Punjab province and one of the handful of other seats he contested around the country.

The victorious PML-N candidate, a PML-N politician called Sardar Ayaz Sadiq, said his opponent had made the mistake of confusing his fame as a former sports star with electability.

"The people might admire him and worship him as a cricket hero, but when they go into the polling booth they are thinking about practical issues like which party will deliver jobs," he said.

He also said Khan's popularity had been exaggerated by the wild enthusiasm for PTI among the relatively small slither of Pakistan's many young voters who are affluent and highly educated.

"He may have got lots of votes among these people in the well-off areas where people are more educated, but he ignored the lower classes who are loyal to us because they have seen us deliver in the last five years," he said.

The PML-N has controlled the provincial government in Punjab since 2008, during which they have pushed through some major development projects, including Pakistan's first mass transit system and effective public health campaigns against dengue fever.

"For manual labourers or people earning a salary of less than 20,000 rupees [£130], changing loyalties is a huge decision," he said.

Analysts conducting postmortems of the election have also argued that Khan's popularity was exaggerated by support from elite classes who dominate the country's media and are active on Twitter.