On April 9, the Saudi-led coalition fighting the Iran-backed Houthi rebels announced a two-week unilateral ceasefire in response to a call for a truce by United Nations special envoy, Martin Griffiths. The move came less than two weeks after Saudi Arabia invited the Houthis to Riyadh for direct peace talks.

The ceasefire is an indication that Riyadh may be preparing to end its involvement in the war and sue for peace. This dovetails with the United Arab Emirates' decision in July 2019 to withdraw its troops, leaving southern Yemen in the hands of its allies in the Southern Transitional Council (STC) and forces loyal to President Abd-Rabbu Mansour Hadi.

By now it has become clear to Saudi Arabia and its allies that they cannot win the war in Yemen and that they urgently need an exit strategy. The coronavirus pandemic provides a convenient opportunity to save face by declaring an end to hostilities on humanitarian grounds.

Saudi Crown Prince Mohammed bin Salman (MBS) is eager to pull out of Yemen so he can focus his energies on addressing the growing economic crisis at home and the threat of an unmanageable COVID-19 outbreak. Most of all, he wants to ensure that his ascendance to the throne, once his father departs the scene, goes smoothly.

Deadlock over Yemen

During the past year, the frontline in Yemen has hardly moved. There have been persistent skirmishes, as well as continuing aerial bombardment by the Saudi-led coalition, but the situation on the ground has largely remained unchanged.

The Houthis are still in control of the capital, Sanaa, and much of the north, while Hadi's internationally recognised government and the STC are ruling over Aden and the south of the country. Fighting continues in the port city of Hodeidah, even though the warring sides signed the Stockholm Agreement in December 2018, which was meant to bring about a ceasefire and the withdrawal of armed groups from the area. The agreement was never really implemented and in 2019 the hostilities killed close to 800 civilians.

While the main frontline remained unchanged, a new one emerged over the past year, as tensions between forces loyal to Hadi and the STC have escalated. The latter, encouraged by the UAE, has been pushing for secession from the north.

Last autumn, an outright war-within-a-war erupted between the two sides, which necessitated a forceful intervention by Saudi troops to separate the combatants. In November, an agreement was reached in Riyadh on power-sharing between the two entities, but over the past month, fighting has started again. In early April, Saudi Arabia was forced to increase its deployment of elite forces to maintain order in Aden.

The agreement appears to be at risk of collapsing, further weakening both anti-Houthi Yemeni factions and Saudi Arabia's position.

The UAE's exit

The UAE, Saudi Arabia's closest ally in the region and a key player in the anti-Houthi coalition, was the first to start looking for an exit from the Yemen conundrum. In 2019, it began handing over more responsibilities to its proxy, the STC, and gradually withdrawing its troops. In July, it made the formal announcement that it was pulling out.

Around the same time, the UAE dispatched a high-level delegation to the Houthis' main backer, Iran, to discuss maritime security issues. That about-face was a clear sign that Abu Dhabi was well on its way not only to de-escalate tensions with Tehran but to chart its own course of action on Yemen, independent of its ally, Saudi Arabia.

In October 2019, the UAE's national security advisor Tahnoun bin Zayed made a secret visit to Tehran after which the UAE announced that it was freeing $700m of frozen Iranian assets. In mid-March, the UAE sent 32 tonnes of supplies to Iran to help it fight the coronavirus outbreak. By then it was clear that the thaw in relations between Abu Dhabi and Tehran was a reality.

The UAE's abandonment of the joint war effort in Yemen and its pursuit of rapprochement with Iran further convinced Saudi Arabia that it was time to seek an exit from the five-year-old conflict.

MBS's considerations

But perhaps the biggest factor in the decision to seek an end to hostilities in Yemen was the domestic situation in the kingdom, which over the past few weeks, has seriously deteriorated.

Of utmost concern to the Saudi leadership today is the spread of the coronavirus. Officially there are some 3,600 people infected with COVID-19 and 50 dead, but there are fears that the true scale of the outbreak is much bigger.

On April 8, the New York Times reported that around 150 members of the Saudi royal family were believed to have contracted the virus, which has forced the young crown prince and King Salman to seek refuge in an island palace near the city of Jeddah.

The epidemic broke out in the country amid MBS's campaign to silence all opposition in the royal family to his imminent ascendance to the throne, thus increasing worries about the stability of the House of Saud. The crown prince also ramped up repression against religious and secular activists inside the kingdom, hoping to pave the way for a smooth transition of power when the time comes.

The country is also experiencing a severe economic crisis due to the pandemic-induced global economic downturn and the collapse in oil prices. Oil exports account for 80 percent of its revenues and the near halving in oil prices has significantly reduced the flow of funds to the state coffers.

This has necessitated swift austerity measures. In early March, the ministry of finance asked all government ministries and agencies to slash their budgets for 2020 by 20 to 30 percent.

The recent agreement between Russia, the US and Saudi Arabia to scale back global oil production by 10 million barrels per day may help the market recover a bit but that will not be enough. The Saudi government needs oil to be around $80 a barrel to break even on its budget.

Considering the sudden collapse in oil revenue, it is hard to know what will become of MBS's hallmark "Vision 2030" which has been touted as the kingdom's grand reform project.

But even before the COVID-19 pandemic, Saudi's oil fortunes appeared uncertain. The much-anticipated IPO of the state-owned oil company Aramco produced disappointing results, while a September 2019 drone strike on oil installations claimed by the Houthis pushed Saudi oil buyers to seek less risk-prone suppliers.

The Houthis' increasing ability to strike military and civilian targets along the border and deep into Saudi territory also rattled the Saudi public. In September 2019, the armed group declared that it had killed and captured thousands of Saudi troops in battles on the border. In March, and despite years of sustained and punishing aerial attacks, the Houthis were still able to fire ballistic missiles over the Saudi capital.

All of these considerations have compelled MBS to seek peace in Yemen. Yet even that may prove to be a challenge. The Houthis, emboldened by the Saudi and Emirati retreat, rejected the ceasefire and continued attacks on Hadi forces. The group demands the lifting of the siege on Yemen imposed by the Saudi-led coalition.

The declared ceasefire is therefore likely to remain unilateral. The Saudis are uninterested in returning to their previous level of involvement in the war. They will, however, respond with aerial assaults on Houthi positions if the latter attack across the border.

The Houthis, on the other hand, may use the ceasefire to try to expand their sway over areas controlled by the Hadi government. With the Saudis busy with their own troubles, the Houthis may feel that now is the time to push for concessions to improve their position in negotiating Yemen's future.

The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial stance.