Egyptian president Mohammed Morsi is refusing to step down as hundreds of thousands of people protest his rule across the country.

Scenes in Cairo's Tahrir Square are strikingly similar to those when the former president, Hosni Mubarak, was ousted in 2011.

Here's an overview of what's happened in Egypt since that historic revolution which fuelled the Arab Spring.

The 2011 Egyptian protests

In January and February 2011, Egypt was hit with the most serious anti-government demonstrations since the former president, Hosni Mubarak, came to power in 1981.

The protests began when several Egyptians set themselves on fire outside government headquarters, an apparent copycat of the suicide of a young Tunisian in December 2010, which unleashed the uprising that overthrew Tunisian president Zine El Abidine Ben Ali.

Mass demonstrations followed, with hundreds of thousands of people taking to the streets across Egypt.

There were clashes with police - about 800 people were killed and 3,000 injured.

In a state televised broadcast on February 2, 2011, Mubarak announced he would not seek re-election in September but would like to finish his current term and promised constitutional reform. 

That was not acceptable to the protesters, who marched on the presidential palace and called for him to step down immediately.

"We hate you, we hate you, we hate you," they chanted.

"We want this government out, we want that president out. We want our country clean, sound and safe."

Photo gallery:

Hosni Mubarak's fall from power

After 18 days of fierce protests, Mubarak announced he was stepping down on February 12, 2011, bringing an end to his 30-year regime.

Celebrations swept across Egypt and the world. Cairo erupted with joyful dancing, singing and cries of "God is greatest".

In Tahrir Square, the epicentre of the revolt, protesters waved flags and cars honked their horns.

Outside the presidential palace protesters shouted "I am Egyptian ... proud to be Egyptian" as they hugged one another. Some fell to the ground, overcome with emotion.

"I can't believe I'm going to see another president in my lifetime," Sherif El Husseiny, a 33-year-old lawyer, said at the time.

The Egyptian army seized control of the country, vowing to act as the guarantor of reforms that Mubarak had promised.

Read more:

Army takes control

The Supreme Council of the Armed Forces (SCAF), the governing body of Egyptian military, took power in Egypt after the fall of Mubarak.

The military council suspended the constitution and dissolved parliament. It made big promises about moving towards democracy and lifting emergency law.

It pledged to ensure the transfer of power to a civilian government elected by the people.

The transition period under military rule saw continued clashes and deaths. Many criticised the military's slow pace of reform.

The military council relinquished power on June 30, 2012, upon the start of Mohammed Morsi's term as president.

Egyptians cast their votes

A presidential election was held on June 16 and 17, 2012.

For many the vote posed a choice between Ahmed Shafik, a military man who served under Mubarak, or Mr Morsi - an Islamist who said he was running for God.

Candidates had to be born in Egypt to Egyptian parents. They could not have dual nationality or be married to a foreigner. To be nominated they required the support of 30 members of parliament or 30,000 votes.

A total of 10 of the 23 candidates were disqualified from the race.

Read more:

Egypt's first democratically elected president

Egypt's first freely-elected president, Mr Morsi, was sworn in at the constitutional court in Cairo on June 30, 2012.

He received 51.7 per cent of the vote. He was seen as a moderate candidate who pledged to be a leader for "all Egyptians", including Christians and secular voters.

"Thank god for the results, the revolution has succeeded," one protester in Tahrir Square said.

The Muslim Brotherhood leader is Egypt's first Islamist president, and the first one without a military background.

Read more:

Mubarak sentenced to life in prison

On May 24, 2011, Mubarak was ordered to stand trial on charges of premeditated murder of peaceful protesters during the revolution.

The trial began in August at a temporary criminal court in Cairo.

Mubarak, whose health had deteriorated, was present in court on a hospital bed and denied the charges against him.

On 2 June 2012, Mubarak was found guilty of not putting a stop to the killing of protesters by the Egyptian security forces and sentenced to life imprisonment.

But in January 2013, an appeals court overturned his life sentence, and ordered a retrial.

As he entered court for the retrial on May 11, 2013, some chanted: "The people want the butcher executed".

There is yet to be a verdict on the retrial.

Read more:

Deadly anniversary protests

Millions of people protest across Egypt on the one year anniversary of Mr Morsi's election, calling for his resignation.

The army has given Mr Morsi a 48-hour deadline to resolve the conflict.

Mr Morsi remains defiant, despite several cabinet ministers quitting, vowing to defend his office.

Dozens of people have been killed in the protests and hundreds more injured.

Read more: