Many areas are still recovering after a northern rebellion and coup that led to foreign military intervention – but no major incidents were reported.
There are 27 candidates and if no outright winner emerges, the voting goes to a second round on 11 August.
However, some analysts have questioned whether Mali is ready for the election.
Some 6.8 million people were eligible to vote at 21,000 polling stations across the country.
Continue reading the main story
At the scene
Alex Duval SmithBamako, Mali
At the Nelson Mandela school, voter Daouda Bertet said: ”I have voted in several elections before but I have never seen so many people. It seems Malians have realised it is time for change and that voting can make a difference.”
The voting stations at the school all opened with no more than a delay of 10 minutes because of staffing problems.
About 2,000 people were at the school, many checking their names against lists to find out which voting station they were due to go to. Each classroom is a voting station for 500 people. It has a single clear plastic ballot box, a screen for voting and a bank of party agents overseeing procedures.
The street outside the school was also packed. Voter Aminata Traore said it was a happy day for Mali. “Things are pretty well organised and everyone is in a good mood.”
But hundreds of thousands of Malians in the north were displaced by fighting. The majority of them were not able to vote.
Islamist militants in the north also warned people not to take part and have threatened to attack polling stations.
There have also been concerns about the fairness of the process in the northern town of Kidal, which is still occupied by Tuareg rebels.
Tuareg gunmen were suspected of abducting electoral officials in the northern Tessalit area last week as they handed out voter identification cards. The officials were later released.
French troops are still deployed in the area with Chadian forces as part of the UN stabilisation force, Minusma.
‘Positively surprised’
Ahead of the poll Louis Michel, who leads the EU’s election observer mission, said that despite the problems he was “positively surprised” by preparations and that the conditions were acceptable.
The US ambassador to Mali, Mary Beth Leonard, said: “A month ago, there were a lot of doubts (over the election). But it has come together.”
Continue reading the main story
Candidates include three former prime ministers, a former finance minister and one woman.
The frontrunners include Ibrahim Boubacar Keita, prime minister from 1994 to 2000, who founded his own party, the Rally for Mali (RPM), in 2001.
His biggest rival is seen as Soumaila Cisse, who founded the Union for the Republic and Democracy (URD) in 2003.
Mr Cisse has called for the junta that seized power in 2012 to be cleared from the political scene.
Observers say Soumana Sacko, another former prime minister, can expect a good showing if there is no clear winner.