Media playback is unsupported on your device Media caption The BBC's Lyse Doucet: "It was the highest voter turnout in decades"

Former Pakistani PM Nawaz Sharif has claimed victory in general elections.

Projections based on partial results suggest a big lead for Mr Sharif's Muslim League (PML-N) party.

Saturday's election saw a large turnout and should pave the way for the country's first transition from one elected government to another.

The governing Pakistan People's Party has lost many seats. It was one of several secular parties unable to campaign freely due to Taliban attacks.

Most of the remaining PPP seats look likely to be in its heartland of Sindh province.

The poll was generally seen as having passed off successfully, but violence on Saturday claimed at least 24 lives.

Analysis Of the many surprises thrown up by Pakistani elections, the most important is the possibility that twice Prime Minister Nawaz Sharif could win a straight majority instead of having to cobble together a coalition, as was earlier expected. It will make the job of decision making simpler. But it will also put Mr Sharif into a tough situation. As an opposition leader, he has distanced himself from the outgoing government's fight against militancy, and has generally leaned towards the religious right-wing. But with the looming Nato withdrawal from Afghanistan, he will be under pressure to revisit this policy. His economic performance will also partially depend on how he tackles militancy as foreign donors will expect continued action against the Taliban in return for assistance in overcoming Pakistan's balance of payments crisis. Analysts attribute his victory largely to his promises of correcting Pakistan's energy supply and encouraging economic growth. Since the bulk of his support is confined to the province of Punjab, he will need to work for a broader consensus across the country if he is to succeed in meeting these challenges.

An election commission spokesman said turnout had been around 60%. In 2008 it was 44%.

'Thank Allah'

Official results are coming in slowly, but projections put Mr Sharif's party ahead in more than 100 of the 272 directly elected parliamentary seats.

It appears that Mr Sharif's party may avoid the need to form a coalition with other parties in the National Assembly.

In a speech at his party headquarters in the north-eastern city of Lahore, Mr Sharif appealed "for all parties to come to the table and sit with me and solve the country's problems".

"We should thank Allah that he has given PML-N [Muslim League] another chance to serve you and Pakistan," he said.

Mr Sharif's victory is largely confined to his native Punjab province, which has nearly 60% of the country's population. However, projections show he should have a large enough bloc in parliament to govern with the help of independents.

The prospect of Mr Sharif forming a new government represents a remarkable political comeback for a man deposed by Gen Pervez Musharraf in a coup in 1999 and subsequently put on trial and given a jail sentence, says the BBC's Mike Wooldridge in Islamabad.

A deal with Saudi Arabia meant he spent time in exile there before returning in 2007 to contest polls the following year.

Taliban threats

Former cricketer Imran Khan, leader of the Movement of Justice (PTI) party, sent a message of congratulations to Mr Sharif.

Mr Khan looks to be on course to win a big victory in a constituency in the city of Peshawar, capital of Khyber Pakhtunkhwa (KP) province.

The PTI looks set to be the largest party in the provincial assembly in the troubled north-western KP province, plagued by a conflict between security forces and militants.

Nawaz Sharif Born in 1949 to family of a prominent Lahore industrialist

Served as Punjab's chief minister from 1985 to 1990 under military dictator Zia ul-Haq

Previous terms as prime minister 1990-1993 and 1997-1999

Deposed by Gen Musharraf and given a jail term

Went into exile in Saudi Arabia before returning in 2007

Seen as conservative and pro-business Profile: Nawaz Sharif What win means for region

However, Mr Khan had thought he had done much better and will be very disappointed with the results, the BBC's Owen Bennett Jones reports from Lahore.

Mr Khan's supporters will want him to hold the government to account in opposition, but it is to be seen whether he is prepared to do that, our correspondent adds.

President Asif Ali Zardari's PPP is in a race for second place with the PTI, but both seem likely to win fewer than than 40 seats.

Outgoing Prime Minister Raja Pervez Ashraf suffered a crushing defeat in his own seat in Rawalpindi.

The PPP hardly tried - because of Taliban threats against it but also because of a lack of will as it was so unpopular - our correspondent adds.

Gen Musharraf made a dramatic return to Pakistan in March to contest the elections, but was disqualified from standing. His APML party is not expected to win more than a handful of seats.

Perhaps we have finally moved towards the realisation that the only hope for us lies in holding on to democracy, and ensuring it moves forward Editorial in Pakistani newspaper The News Press celebratesIn pictures: Voters' defiance

Saturday's poll saw contests in 272 directly-elected seats for the National Assembly. There are a further 70 seats reserved for women and minorities which will be apportioned according to the parties' performance in the directly elected constituencies.

The Pakistani Taliban threatened to carry out suicide attacks ahead of the election. They have been blamed for numerous attacks throughout the campaign on Pakistan's three most prominent liberal parties.

The PPP along with the Karachi-based Muttahida Quami Movement (MQM) and the Awami National Party (ANP) were singled out for threats, and were forced to curtail their campaigning as a result.

In the run-up to the election, more than 100 people died in election-related violence.

Before polls opened, Pakistan sealed its borders with Iran and Afghanistan in an effort to keep foreign militants at bay. Officials said the borders would remain closed for the next three days.

On election day itself, the Pakistan Taliban said they planted a bomb which killed 11 people and wounded 40 others outside the office of the Awami National Party in Karachi.

There were also deadly attacks in Balochistan and the north-western city of Peshawar.

On Sunday, Afghan President Hamid Karzai congratulated Pakistan on conducting a "successful general election" and called on the incoming government to expand co-operation in combating Taliban militancy.