There have been long queues at polling stations in Ghana amid a tight election race between President John Mahama and veteran opposition leader Nana Akufo Addo.
All seven candidates have pledged to keep the process peaceful but an opposition supporter died when a rally tuned violent on Monday.
The campaign has been dominated by the faltering state of Ghana's economy and the issue of corruption.
Results are expected within three days.
A run-off will be held later in the month if neither of the two main candidates secures more than 50% of the votes.
Polls have officially closed but those already in queue before 17:00 local time are being allowed to vote. In a number of constituencies where voting started late, that deadline has been extended by five hours, an election commission spokesman told Ghanaian website Joy News.
Casting my vote - Akwasi Sarpong, BBC Africa, Tema
In Tema, where I'm registered, I found a queue of men and women waiting for voting to start. The first in one of the queues, Alfred Aggrey, told me he arrived five hours earlier. Many wanted to get on with their day's business.
Loud noises of disapproval rung out when polling officers positioned the voting booths away from the crowd. People demanded that the booths be made to face them so they could see people going in to thumbprint only the assigned ballot papers and no other papers that they suspected could be smuggled in.
After a few minutes of shouting at the officers, their request was carried out to cheers of approval.
Voting in his northern home region of Bole, where he was mobbed by a cheering crowd, President Mahama said Ghana's democracy had "matured" and this election would further consolidate it.
Asked about corruption, he told AFP news agency: "There is a general perception of corruption in all African countries. I think it is a stage of our development. As we continue to strengthen the institutions of state, I think that people will come to see the integrity in these institutions."
Casting his vote in Kibi in the south of Ghana, Mr Akufo-Addo said he hoped for an orderly election.
"It's very important that this process goes off efficiently and smoothly and peacefully so that Ghana continues to maintain its deserved image of being a democracy that takes democracy seriously," he said.
The candidates signed a pact last week vowing to follow electoral rules and keep the peace.
Many Ghanaians began queuing at polling stations overnight.
"I needed to register the strong feeling I have about this country with my thumb and the least I could do was to sacrifice sleep," Comfort Laryea, a 78-year-old who had waited to vote since 04:00 in the capital, Accra, told the Reuters news agency.
For many, the economy is the main issue.
"We need change in Ghana because things are very difficult," taxi driver Stephen Antwi Boasiako told the AP news agency. "This country has a lot of resources that can provide good jobs, but they're not used."
Police have told voters to go home after casting their votes, Joy FM reported.
Clashes near the border with Togo on Monday left one person dead and six in a critical condition.
Defeat for Mr Mahama of the National Democratic Congress (NDC) would make him the first incumbent to lose an election since Ghana returned to multi-party democracy.
He has been nicknamed "Mr Dumsor", a local word that refers to the power cuts that have blighted the country during his term, but on the campaign trial has been trying to convince Ghanaians that he is delivering on his promise of creating more jobs.
Mr Akufo-Addo meanwhile has promised free high-school education and more factories, but his critics have questioned the viability of his ambitions.
The other four candidates include former first lady Nana Konadu Agyeman-Rawlings of the National Democratic Party (NDP), whose husband Jerry John Rawlings initially took power in the 1979 coup.
She is the first woman to run for president in the West African country.
NDC candidate: John Dramani Mahama, 58
- Vice-president under President John Atta Mills, who died in 2012. Completed his term
- Now seeking re-election after serving his first term of four years
- Political pedigree: His father was first minister of state for the Northern region
NPP candidate: Nana Addo Dankwa Akufo-Addo, 72
- Campaigned for a return to multi-party democracy under military rule
- A former justice and foreign minister in the NPP government from 2001 to 2007, he is running for president for a third time
- Political pedigree: His father was a prominent politician who served as chief justice and ceremonial president