Toure, who had held the post since September, was attempting to defeat the popular Socialist mayor of the capital, Khalifa Sall, in Dakar's constituency of Grand Yoff. The mayor is no blood relation of the president. The government performed badly in big cities at the elections in a sign of public discontent over the policies of Sall, who came to power two years ago.
"She was sacked. She is no longer the prime minister," a source close to the presidency told Reuters.
Her departure from government opens the way for Sall to speed up his reform process and attempt to create more jobs ahead of elections set for 2017.
Many voters say his policies aimed at tackling corruption and improving governance have failed to provide jobs and economic growth in the former French colony of 13 million people.