Musharraf promised to work with the new government regardless of who won the vote, after a year of turmoil that has seen an explosion in Taliban militancy and growing public disaffection with Pakistan's support of the U.S.-led war on terror.
"I will say from my side, whichever political party will win, whoever will become prime minister and chief ministers, congratulation to them on my behalf. And I will give them full cooperation as president whatever is my role," the president told state television.
Public antipathy over Musharraf's support of the U.S.-led war on terror could count against his political allies, as could his recent declaration of emergency rule and purging of the judiciary to safeguard his controversial re-election as president in October.
An overwhelming victory by the opposition, headed by Benazir Bhutto's Pakistan People's Party, or PPP, could leave Musharraf politically vulnerable to impeachment.
"It is the fate of the Pakistan People's Party that it will win, and we will change the system after winning," said Bhutto's husband, Asif Ali Zardari, after casting his vote in his hometown of Nawab Shah.
Two public opinion surveys by U.S. groups have suggested that if the election is fair, Bhutto's party will finish first, followed by the opposition party of ex-Premier Nawaz Sharif. The pro-Musharraf party — the Pakistani Muslim League-Q — is trailing in third.
But the PML-Q still predicts it will fare strongly in rural areas of the largest province, Punjab, where the election is likely to be lost or won and where allegiance to feudal landlords, rather than a party's profile, can determine how people vote.
Opposition politicians have accused the government of planning to rig the balloting, and have threatened street protests.
Musharraf, who recently ceded his command of Pakistan's powerful army, has warned he would not tolerate such protests, which could set the stage for a dangerous confrontation in this nuclear-armed nation.
Before casting his vote in the city of Rawalpindi, he urged candidates to accept results of the vote.
"If they win they should not show arrogance and if they lose they should show grace, accepting the result," Musharraf said in comments broadcast Monday on state television.
Pakistan has lurched in its 60-year history between weak civilian governments and military rule — including the period since Musharraf's takeover in a 1999 coup.
"This is about Pakistan and the government's relationship with its people, and it is about Pakistan's ability to show the world that it has a credible election, therefore a credible government," said Sen. John Kerry as he observed voting in the eastern city of Lahore.
More than 470,000 police and soldiers were deployed nationwide to provide security after a wave of suicide bombings, including the Dec. 27 assassination of Bhutto that forced a six-week delay in the vote. The day was declared a public holiday to encourage citizens to turn out to vote.
But while fears of attack warded off some voters, sympathy for Bhutto and disaffection over rising food prices compelled others to exercise their democratic rights.
"My vote is for the PPP," said Munir Ahmed Tariq, a retired police officer in Nawab Shah. "If there is rigging this time, there will be a severe reaction. This is a sentiment of this nation."
But turnout in many parts of the country appeared low — possibly below the 41 percent recorded in the last general elections in 2002.
At a polling station in the key city of Lahore, just 28 percent of the 2,740 registered voters had turned out, with just 90 minutes of voting to go.
Opposition parties and analysts claim that local authorities have used state resources to back ruling party candidates — claims that have been denied by the government, which has promised a free and fair vote.
The last general election, which installed pro-Musharraf parliament, was widely regarded as flawed and lawmakers have provided little check on the president's dominance. But with power — and popularity — now diminished the incoming parliament could have more leverage.
Along with fears of Taliban attacks, political violence stalked the election.
Violence between rival political factions in the key province of Punjab has killed at least nine people and wounded dozens more since Sunday night, including provincial assembly candidate from the opposition party of Sharif, officials said.
Two people were killed and 10 injured in clashes between rival political groups in Sindh province, officials said.
Police arrested an election official after 600 ballot papers went missing from a polling station in the southern city of Shikarpur, said police official Ali Mohammed Shahni.
Inflation, power outages and insecurity were key issues for voters.
In Karachi, housewife Nargis Hamid just said she was voting for "peace" as the country could not progress without it. In Multan, Fatima Bibi, 45, said she supported Sharif's party to cut the price of flour and cooking oil. Mohsin Ali, a 24-year old business administration student in Lahore, said he cast his ballot at random to show support for democracy and contempt for Pakistan's notoriously corrupt politicians.
"They are all simply seeking power and once they are in power we are nobody," said Ali, wearing a trimmed beard and a prayer cap. "Democracy has not been given a chance. Any time anything happens, the military steps in."
In the remote border region of Bajur — a possible hiding place of Osama bin Laden and his top deputy Ayman al-Zawahri, hundreds of Pashtun tribesmen turned out to vote at a polling set up inside a government college, and dismissed the threat of attack.
"We are not afraid of the situation. Death comes only once," said farmer Amanat Shah. A nearby, segregated polling station for women, was empty — a reflection of conservative attitudes in Pakistan's tribal belt.