Updated

Morocco's new prime minister is determined to succeed where his predecessor failed, and swiftly began negotiations this week with rivals to build a government and end a crisis threatening the economy and Morocco's reputation for stability.

The nomination of Saadeddine El Othmani as prime minister, after a surprise political intervention by Moroccan King Mohammed VI, has revived hopes for a solution to five months of political deadlock.

Othmani has already shown a different style from predecessor Abdelilah Benkirane, who struggled to build a coalition government after the moderate Islamist party PJD won parliamentary elections in October. Benkirane refused to talk to some rivals and alienated others, and the king ousted him last week and appointed Othmani instead.

Othmani, 61, the No. 2 in the Party for Justice and Development, told The Associated Press he would meet "all the political parties represented in parliament, and decide on alliances" based on those meetings.

The political deadlock has meant Morocco, a close ally with the U.S. and Europe in the fight against terrorism, hasn't approved a 2017 budget. It has also caused unusual political uncertainty in a country known for political stability after Arab Spring uprisings around the region.

The new premier met Tuesday with the heads of several rival parties, including outgoing agriculture minister Aziz Akhannouche of the RNI, a billionaire close to the royal palace. Akhannouche heads a political bloc composed of several parties that wants to negotiate an entry into the government, and disaccord between him and Benkirane was at the heart of the crisis.

Akhannouche said after the meeting that he had confidence in Othmani, who said he was "ready to cooperate."

Outgoing Transport Minister Abdelaziz Rebbah — whose name had also been floated for the prime minister post — expressed confidence in Othmani's chances of forming a government, saying the king chose him because of his experience leading their party through difficult times.

Othmani "was always presented as the intellectual of the party. That could help" end Morocco's crisis, said Jean-Noël Ferrié, director of the political science department of Rabat International University.

The PJD won 125 of the 395 seats in the parliament but not enough to govern alone. The party had hoped to rebuild its previous coalition with the pro-market RNI, socialist PPS and conservative MP parties. But the RNI and MP parties wanted to include two other groups as well, and the negotiations froze.