BAMAKO (Reuters) - Mali’s presidential election will go to a run-off poll after President Ibrahim Boubacar Keita failed to get enough votes to win a second term in office outright, according to preliminary figures provided by the government.

Keita won 41.4 percent of the vote in the mostly desert West African country, while rival Soumaila Cisse won 17.8 percent, the Ministry of Territorial Administration said on Thursday, four days after an election marred by accusations of fraud and attacks by suspected militants that prevented thousands from voting.

With neither candidate obtaining the 50 percent required to win outright, the two will meet in a runoff vote later this month. Turnout was just over 43 percent, in line with a historical average that is the lowest in West Africa.

Keita’s camp had been confident of winning the most votes in the lead up to the count, but had not ruled out the possibility of a second round. They put a positive spin on the poll after the results were announced.

“Forty-one percent in the first round of an election with 24 other candidates is a performance we salute,” said spokesman Mahamadou Camara. “We are confident for what comes next in the election.”

However, his rivals repeated claims that the president’s camp rigged the election by tampering with the electoral roll. Keita has denied any wrongdoing and said the results were fair.

“This election was marred by irregularities, fraud ... and corruption. Despite the magnitude of the fraud the president is forced to go to a second round. It is a victory of the Malian people,” said Cisse’s campaign director Tiebile Drame.

Slideshow ( 11 images )

Armed assailants shut down 644 polling stations on Sunday, representing about 3 percent of the total. About a fifth were troubled by violence, figures from the Ministry of Territorial Administration showed. The European Union mission to observe the election said there were irregularities, including in the distribution of electoral cards.

That fueled doubts about the election’s credibility and worries that it did not fully reflect the will of Malians, large numbers of whom are spread across a vast desert where jihadists with links to al Qaeda and Islamic State roam.

Islamist militants took over the north in 2012 on the back of a Tuareg rebellion, imposing Sharia law until French troops intervened a year later to push them back. Militants have since regained territory and influence, making many scared to come out and vote.

Growth has averaged 5 percent under Keita, and Mali’s key exports of gold and cotton have flourished, as have agricultural staples such as rice, but security has worsened, especially in the lead up to the vote.

In June, a suicide bomber drove a vehicle laden with explosives into the headquarters of the regional G5 Sahel anti-terrorist force in Severe, central Mali, killing three people.

The United Nations peacekeeping mission to Mali has suffered some 170 deaths, more than 100 by “malicious acts.” Human rights groups have raised the alarm over alleged executions by security forces. The Defence Ministry promised to investigate.

Despite the political turbulence, Malians have this week kept up a tradition in the country of not taking to the streets in violent protest during elections, and the capital Bamako was calm on Thursday evening.