Morocco's King Mohammed VI on Monday reappointed outgoing Prime Minister Abdelilah Benkirane and instructed him to form a new government after his moderate Islamist Justice and Development Party (PJD) came first in Friday's legislative elections.
Under constitutional reforms adopted in 2011 to quell pro-democracy protests, the prime minister must be appointed from the largest party in parliament.
Benkirane, whose PJD won 125 out of 395 seats in the House of Representatives, told reporters that he was "happy" with the appointment as he left the royal palace.
The Islamist leader said he was optimistic that he would be able to form a government after talks with other parties.
The three smaller secular parties in the outgoing coalition won 76 seats between them, meaning that the same government could again take office if the parties can reach agreement.
Observers do not expect a coalition deal between the PJD and the second-largest party, the liberal-leaning Authenticity and Modernity Party, which is thought to be close to the monarchy and is a fierce rival of the Islamists.
During the election campaign, both parties ruled out entering coalition with each other.