Yemen's government and Houthi rebels have signed an agreement to try to end a political crisis that has seen some of the worst violence for years in the capital, Sanaa.

Yemen is suffering its most severe crisis in years, with Houthi rebels in control of large parts of the country, including the capital Sanaa, a weak government and a divided military.

The fighting, which came after weeks of protests and clashes, threatened to derail the UN-backed transition to democracy launched after President Ali Abdullah Saleh was forced to step down in 2011.

The crisis has threatened to derail the UN-backed transition to democracy launched after longtime President Ali Abdullah Saleh was forced to hand over power in 2011.

Why is Yemen so unstable?

Why is Yemen so unstable?

In recent years Yemen has seen violent conflicts largely caused by underlying problems of unequal access to power and resources.

In recent years Yemen has seen violent conflicts largely caused by underlying problems of unequal access to power and resources.

There have been six rounds of fighting between the state and the Houthis in the North; a separatist movement in the South; frequent attacks by al-Qaeda in the Arabian Peninsula (AQAP); power struggles between tribal and military factions; and the crackdown by Mr Saleh's supporters on the protests by youths and pro-democracy activists that eventually forced him to hand over power to his deputy, Abdrabbuh Mansour Hadi.

There have been six rounds of fighting between the state and the Houthis in the North; separatist unrest in the South; frequent attacks by al-Qaeda in the Arabian Peninsula (AQAP); power struggles between tribal and military factions; and the crackdown by Mr Saleh's supporters on the protests by youths and pro-democracy activists that eventually forced him to hand over power to his deputy, Abdrabbuh Mansour Hadi.

The instability and resulting large-scale displacement, as well as weak governance, corruption, resource depletion and poor infrastructure, have hindered development in the poorest country in the Middle East. Unemployment, high food prices and limited social services mean more than 10 million Yemenis are believed to be food insecure.

The instability and resulting large-scale displacement, as well as weak governance, corruption, resource depletion and poor infrastructure, have hindered development in the poorest country in the Middle East.

Unemployment, high food prices and limited social services mean more than 10 million Yemenis are believed to be food insecure.

Yemen profile

Yemen profile

Who are the Houthis?

What do the Houthis want?

The Houthis are members of rebel group, also known as Ansar Allah (Partisans of God), who adhere to a branch of Shia Islam known as Zaidism. Zaidis make up one-third of the population and ruled North Yemen under a system known as the imamate for almost 1,000 years until 1962.

The Houthis are members of a rebel group, also known as Ansar Allah (Partisans of God), who adhere to a branch of Shia Islam known as Zaidism. Zaidis make up one-third of the population and ruled North Yemen under a system known as the imamate for almost 1,000 years until 1962.

The Houthis take their name from Hussein Badr al-Din al-Houthi. He led the group's first uprising in 2004 in an effort to win greater autonomy for their heartland of Saada province, and also to protect Zaidi religious and cultural traditions from perceived encroachment by Sunni Islamists. After Houthi was killed by the Yemeni military in late 2004, his family took charge and led another five rebellions before a ceasefire was signed with the government in 2010.

The Houthis take their name from Hussein Badr al-Din al-Houthi. He led the group's first uprising in 2004 in an effort to win greater autonomy for their heartland of Saada province, and also to protect Zaidi religious and cultural traditions from perceived encroachment by Sunni Islamists.

In 2011, the Houthis joined the protests against Mr Saleh and took advantage of the power vacuum to expand their territorial control in Saada and neighbouring Amran province. They subsequently participated in the National Dialogue Conference (NDC), which led to President Hadi announcing plans in February 2014 for Yemen to become a federation of six regions.

After Houthi was killed by the Yemeni military in late 2004, his family took charge and led another five rebellions before a ceasefire was signed with the government in 2010.

In 2011, the Houthis joined the protests against Mr Saleh and took advantage of the power vacuum to expand their territorial control in Saada and neighbouring Amran province.

They subsequently participated in the National Dialogue Conference (NDC), which led to President Hadi announcing plans in February 2014 for Yemen to become a federation of six regions.

In July, the Houthis inflicted a series of defeats on tribal and militia groups in Amran province backed by the country's leading Sunni Islamist party, Islah.

In July, the Houthis inflicted a series of defeats on tribal and militia groups in Amran province backed by the country's leading Sunni Islamist party, Islah.

The Houthis claim that Yemenis welcome them because they are frustrated with a transitional government dominated by those linked to the old regime, including the Saleh and Ahmar families, and Islah.

Yemen's Houthi rebels defy years of war and repression

Yemen's Houthi rebels defy years of war and repression

Analysis: Yemen faces fresh challenges as National Dialogue ends

Analysis: Yemen faces fresh challenges as National Dialogue ends

What do they want?

How did the crisis escalate?

In mid-August, the Houthis' leader Abdul Malik al-Houthi demanded that President Hadi reverse a decision to remove subsidies that had hit the country's poor and that he replace the "corrupt" government with one that better represented Yemen's various factions.

Emboldened by their military victories in the north, the Houthis' leader Abdul Malik al-Houthi demanded in mid-August that President Hadi reverse a decision to remove subsidies that had hit the country's poor and that he replace the "corrupt" government with one that better represented Yemen's various factions.

Thousands of Houthi supporters - both Shia and Sunnis - then began taking part in sit-ins in front of government buildings in Sanaa and blocking the main road to the city's airport.

Thousands of Houthi supporters - both Shia and Sunnis - then began taking part in sit-ins in front of government buildings in Sanaa and blocking the main road to the city's airport.

On 2 September, Mr Hadi agreed to dismiss his government and promised fuel price cuts of about 30% in a bid to end the stand-off. He said he would appoint a new prime minister and allow factions to nominate ministers from their own ranks. However, the initiative was rejected by the Houthis as insufficient.

On 2 September, Mr Hadi agreed to dismiss his government and promised fuel price cuts of about 30% in a bid to end the stand-off. However, the initiative was rejected by the Houthis as insufficient.

A week later, the situation escalated when security forces opened fire on Houthi supporters in Sanaa, killing several people. Negotiations between the Houthis and government were suspended on 15 September after the rebels complained of "foreign interventions".

A week later, the crisis deepened when security forces opened fire on Houthi supporters in Sanaa, killing several people.

Has there been a coup?

In mid-September, there were several days of fierce clashes between Houthis and soldiers in the capital, during which the rebels occupied government buildings and seized the headquarters of a military division loyal to Brig Gen Ali Mohsen al-Ahmar, a Sunni Islamist who led the fight against them in the north between 2004 and 2010 and whose family plays a leading role in Islah.

Although the prime minister stepped down and an army chief fled as the Houthis took over key sites in the capital, the president remains in power, having made political concessions to the Houthis in a peace deal.

With the death toll rising, the UN special envoy to Yemen Jamal Benomar announced on 20 September that the government had agreed a deal with the Houthis. The next day, Prime Minister Mohammed Basindwa said he was resigning to help consensus emerge from the accord.

Violence escalated on 18 September as Houthis clashed with soldiers and allied tribesmen on the outskirts of Sanaa. The fighting intensified over the following days and spread to the city centre. The Houthis seized the state television building and took control of the headquarters of a military division loyal to Brig Gen Ali Mohsen al-Ahmar, a Sunni Islamist who led the fight against them in the north between 2004 and 2010 and whose family plays a leading role in Islah.

Members of Islah meanwhile expressed fears that they would be persecuted by the Houthis, who they believe ultimately hope to reinstall the Zaidi imamate.

With the death toll rising, the UN special envoy to Yemen Jamal Benomar announced on 20 September that the government had agreed a deal with the Houthis. The next day, Prime Minister Mohammed Basindwa said he was resigning to help consensus emerge from the accord. Several military units appeared to shift their support to the Houthis while the interior ministry said it had ordered the police to "co-operate".

What were the terms of the peace deal?

Will the peace deal end the crisis?

The rebels agreed to withdraw from Sanaa in exchange for their main demands being met - the restoration of fuel subsidies; the formation of a new "technocratic national government" and the appointment of presidential advisers by the Houthis and the secessionist Hiraak al-Janoubi (Southern Movement); and the implementation of policies agreed at the NDC.

The agreement should see the rebels withdraw from Sanaa in exchange for their main demands being met - the restoration of fuel subsidies; the formation of a new "technocratic national government" and the appointment of presidential advisers by the Houthis and the secessionist Hiraak al-Janoubi (Southern Movement); and the implementation of policies agreed at the National Dialogue Conference.

However, Houthi representatives declined to sign a "security appendix" to the deal that stipulated that they withdraw from the capital and other northern cities and surrender their weapons to the authorities within 45 days.

However, Houthi representatives declined to sign a "security appendix" to the deal that stipulates that they withdraw from the capital and other northern cities and surrender their weapons to the authorities within 45 days. The next day, rebels were seen with a large amount of weaponry seized from military bases, including tanks and armoured vehicles.

Four months later, heavily-armed rebels are still patrolling the streets of Sanaa. The Houthis have dismissed public officials and demanded oversight of ministries as part of what they say is an attempt to reform the corrupt political system.

Members of Islah meanwhile expressed fear that they would be persecuted or marginalised by the Houthis, who they believe ultimately hope to reinstall the Zaidi imamate.

The rebels have also moved into central and western parts of the country that are predominantly Sunni, triggering clashes with jihadist militants from al-Qaeda in the Arabian Peninsula (AQAP).

Fear of sectarian war grows in Yemen

Fear of sectarian war grows in Yemen

What's behind the latest unrest?

On 19 January, there were fierce clashes between Houthi fighters and soldiers near the presidential palace in Sanaa. Although a ceasefire was agreed with the government, the next day the rebels stormed the presidential palace complex and shelled the private home of Mr Hadi.

In a televised address on 20 January, Abdul Malik al-Houthi heavily criticised the president and those around him, saying they had failed to implement political deals that should have ushered in a new era in Yemen.

If Mr Hadi refused to do so, "all options are open", Mr Houthi warned. He listed as his main demand the shake-up of the commission tasked with writing a review of a new constitution to ensure more representation for his group.

The rebels have rejected a draft of the charter that would create a federal state of six regions, even though the plan was a recommendation of the NDC, which they backed.

On 17 January, the Houthis abducted the president's chief of staff, Ahmed Awad bin Mubarak, who had been due to attend a meeting to discuss the draft. They said they had become aware of "irregularities" in both the text and how the government was planning to make it law.

Mr Hadi has also accused his predecessor of attempting to scupper Yemen's political transition. Since taking over the presidency in 2012, he has tried to curb Mr Saleh's influence by removing loyalists from senior posts in the government and military.

However, Mr Saleh has been accused by the US of backing the Houthis' takeover of Sanaa "to not only delegitimize the central government, but also create enough instability to stage a coup".

In November, the UN Security Council imposed sanctions on him and two senior Houthi leaders for threatening Yemen's peace and stability, and obstructing the political process.

In recent months, Mr Saleh's supporters have proposed that his eldest son, Ahmed, run in elections to replace Mr Hadi as president.

Regional Shia power Iran has also been accused of giving financial and military support to the Houthis - something both have denied.

Why are developments in Yemen important elsewhere?

Why are developments in Yemen important elsewhere?

The stability of Yemen is a priority for the US and its Gulf Arab allies because of its strategic position next to Saudi Arabia, a top oil exporter, and shipping lanes in the Gulf of Aden. It is also home to one of al-Qaeda's most active regional offshoots, which the US has been seeking to combat with a combination of drone strikes and local counter-terrorism and security assistance.

The stability of Yemen is a priority for the US and its Gulf Arab allies because of its strategic position next to Saudi Arabia, a top oil exporter, and shipping lanes in the Gulf of Aden.

It is also home to one of al-Qaeda's most active regional offshoots, which the US has been seeking to combat with a combination of drone strikes and local counter-terrorism and security assistance.

The Houthis' gains may also exacerbate sectarian and political tensions in the region. Saudi Arabia, the main Sunni power, believes that the rebels are backed militarily, financially and politically by its Shia regional arch-rival, Iran - something both have denied.

The Houthis' gains may also exacerbate sectarian and political tensions in the region. Saudi Arabia, the main Sunni power, believes that the rebels are backed militarily, financially and politically by its Shia regional arch-rival, Iran - something both have denied.