BAMAKO, Mali — Mali’s presidential election will go to a runoff vote after President Ibrahim Boubacar Keïta failed to get enough votes to win a second term outright, according to preliminary figures released Thursday by the government.

Mr. Keïta won 41.4 percent of the vote in Mali, a West African country that is mostly desert, while his rival, Soumaïla Cissé, won 17.8 percent, the Ministry of Territorial Administration said.

With neither candidate obtaining the 50 percent required to win outright, the two will take part in a runoff election later this month. Turnout was just over 43 percent, in line with the historical average.

Mali, a gold and cotton producer and a former French colony, has a history of peaceful elections, but this vote was marred by claims of irregularities and attacks by suspected militants that prevented thousands from voting.