Media playback is unsupported on your device Media caption The BBC's Bilal Sarwary says there have been reports of gunfire and fraud in some provinces but that people are still coming out to vote

Millions of Afghans have cast their votes in a presidential run-off to elect a successor to Hamid Karzai, who has been in office since 2001.

Taliban militants, who had threatened to disrupt the vote, launched low-level attacks in which at least 46 people were killed across the country.

More than seven million people turned out to vote, election officials said.

Voters are choosing between former Foreign Minister Abdullah Abdullah and ex-World Bank economist Ashraf Ghani.

This election will be the first time that power in Afghanistan has been democratically transferred.

The Taliban had said they would target voting, and there were concerns that fraud could produce a disputed result.

The Afghan interior minister earlier said there had been 150 attacks. BBC reporters across the country said they had seen more violence than in the previous round, but most incidents were relatively low level.

Image copyright AFP Image caption The two leading candidates Ashraf Ghani (left) and Abdullah Abdullah (right) have campaigned relentlessly ahead of the second round

Image caption Nearly 40% of the voters were women, election officials say

Election commission chief Ahmad Yousef Nooristani said fewer than 200 of the 6,365 polling stations were unable to operate because of security concerns.

Of those who turned out to vote, 38% were women and 62% were men, he said.

Mr Nooristani also said there had been some complaints of irregularities which would be investigated, but did not give further details.

Presidential candidate Abdullah Abdullah thanked "the whole nation of participating in the election" and called for a full investigation in the allegations of fraud.

Analysis: Lyse Doucet, BBC Chief international correspondent

Afghans who've lived through all the devastating wars since President Najibullah's Soviet-backed rule are hoping this election will help turn the page on their punishing history.

It will be the first time in Afghan history that power is transferred peacefully, from one elected leader to another.

Months of vigorous campaigning, and an impressive turnout in the first round of voting, were a strong testament to a country determined to move forward in the face of Taliban threats and violence.

Despite all the disappointments and setbacks since 2001, Afghanistan is now a changed country.

When Afghans turn out to vote for this crucial second round, it will be a test of their security forces as well as the electoral institutions.

Voting for a better future

Mr Abdullah won 45% of the first-round vote, with Mr Ghani securing 31.6% - neither achieved the 50% needed to avoid a second round.

Both sides have faced multiple claims of fraud.

Image caption Men and women vote separately, here in Kandahar province and across the rest of Afghanistan

Officials say that their main fear is a close outcome, because that would allow the supporters of whoever loses to reject defeat, possibly throwing the country back into war along ethnic lines.

The preliminary result is expected on 2 July and the final result on 22 July.

Media playback is unsupported on your device Media caption David Loyn meets voters in the Pashtun heartland

As most foreign soldiers prepare to withdraw by the end of this year, the next president will face multiple challenges.

Taliban insurgents remain active, the economy is weak, corruption is endemic and the rule of law goes largely unenforced.

Correspondents say that a seamless transfer of power would be a significant achievement for Afghanistan and a vindication of international efforts to establish a functioning democracy after the abuses of the Taliban era.