With the country split in two after militants wrested control of northern desert regions after a March coup in the capital Bamako, political parties including Traore's have called for Diarra's ouster.
"The president of the republic renews his confidence" in the prime minister and asked him "to make proposals on forming a government of national unity", said a statement from the president's office, read on national radio and television.
The decision was taken after consultations held on Saturday by Traore with the country's "civil society", including political parties and the junta that overthrew the regime of Amadou Toumani Toure on March 22 before handing over to a transition regime two weeks later.
The CVs of the future members of a national unity government, demanded by Mali's west African neighbours, must be received by the prime minister on Tuesday at the latest, the statement said.
Diarra, an internationally renowned astrophysicist who came to power on April 24, has been under fire from much of Mali's political class including Traore's party who accused him of incompetence and called for his departure.
They claimed he has no "strategy" no solve the problem in the vast north of the country where Islamist groups seized key cities in the chaos following the March coup d'etat and brutally imposed sharia law.
Up to 60 000 people gathered Sunday for a giant peace rally in Bamako's main stadium. It was called by the country's top Muslim body and drew several key politicians including Diarra.
"Let us pray for Mali, let us pray for peace," urged Mahmoud Dicko, the head of Mali's High Islamic Council, as he addressed a crowd that an AFP reporter estimated at between 50 000 and 60 000.
Dicko recently met with the Movement for Oneness and Jihad in West Africa (MUJAO), one of two Islamist groups, along with Ansar Dine (Defenders of Faith), occupying the north of the country.
The takeover was spearheaded by Tuareg rebels seeking an independent state for their nomadic desert tribe, but the extremists have pushed them aside and seek an Islamic state in the zone, an area larger than France or Texas.
The groups – which security experts say are acting under the aegis of Al-Qaeda in the Islamic Maghreb (AQIM) – have since imposed strict Islamic law in northern Mali, prompting outrage as they stoned an unmarried couple to death last month and cut off the hand of a thief on Wednesday.
Fighters from Ansar Dine also destroyed part of Timbuktu's cultural treasures, declaring the ancient Muslim shrines "haram" or forbidden in Islam shortly after Unesco placed them on a list of endangered World Heritage sites. – AFP