Egypt's Muslim Brotherhood is perhaps facing the most serious crisis in its 85-year history.
President Mohammed Morsi, a member of the group, was ousted by the military, senior leaders and thousands of members have been detained, and its headquarters have been ransacked and burned.
Protest camps set up in the capital Cairo to call for his reinstatement have been stormed by Egyptian security forces with great loss of life. The Brotherhood described the action - which brought international condemnation - as "a massacre".
In December, the interim Egyptian government declared the group a "terrorist organisation", blaming it for a string of attacks, which the Brotherhood denied.
The movement is the country's oldest and largest Islamist organisation, meaning its ideology is based on the teachings of the Koran.
Founded by Hassan al-Banna, the Muslim Brotherhood - or al-Ikhwan al-Muslimun in Arabic - has influenced Islamist movements around the world with its model of political activism combined with Islamic charity work.
The movement initially aimed simply to spread Islamic morals and good works, but soon became involved in politics, particularly the fight to rid Egypt of British colonial control and cleanse it of all Western influence.
While the Ikhwan say that they support democratic principles, one of the group's stated aims is to create a state ruled by Islamic law, or Sharia. Its most famous slogan, used worldwide, is: "Islam is the solution."
After Banna launched the Muslim Brotherhood in 1928, branches were set up throughout the country - each running a mosque, a school and a sporting club - and its membership grew rapidly.
By the late 1940s, the group is estimated to have had 500,000 members in Egypt, and its ideas had spread across the Arab world.
At the same time, Banna created a paramilitary wing, the Special Apparatus, whose operatives joined the fight against British rule and engaged in a campaign of bombings and assassinations.
The Egyptian government dissolved the group in late 1948 for attacking British and Jewish interests. Soon afterwards, the group was accused of assassinating Prime Minister Mahmoud al-Nuqrashi.
Banna denounced the killing, but he was subsequently shot dead by an unknown gunman - believed to have been a member of the security forces.
In 1952, colonial rule came to an end following a military coup d'etat led by a group of young officers calling themselves the Free Officers.
The Ikhwan played a supporting role - Anwar al-Sadat, who became president in 1970, was once the Free Officers' liaison with them - and initially co-operated with the new government, but relations soon soured.
After a failed attempt to assassinate President Gamal Abdul Nasser in 1954, the Ikhwan were blamed, banned, and thousands of members imprisoned and tortured. The group continued, however, to grow underground.
This clash with the authorities prompted an important shift in the ideology of the Ikhwan, evident in the writing of one prominent member, Sayyid Qutb.
Qutb's work advocated the use of jihad (struggle) against jahili (ignorant) societies, both Western and so-called Islamic ones, which he argued were in need of radical transformation.
His writings - particularly the 1964 work Milestones - inspired the founders of many radical Islamist groups, including Islamic Jihad and al-Qaeda.
In 1965, the government again cracked down on the Ikhwan, executing Qutb in 1966 and transforming him into a martyr for many people across the region.
During the 1980s, the Ikhwan attempted to rejoin the political mainstream.
Successive leaders formed alliances with the Wafd party in 1984, and with the Socialist Labour Party and the Socialist Liberals Party in 1987, becoming the main opposition force in Egypt. In 2000, the Ikhwan won 17 seats in the lower house of parliament, the People's Assembly.
Five years later, the group achieved its best election result up to then, with independent candidates allied to it winning 20% of the seats.
The result shocked President Hosni Mubarak. The government subsequently launched a crackdown on the Ikhwan, detaining hundreds of members, and instituted a number of legal "reforms" to counter their resurgence.
The constitution was rewritten to stipulate that "political activity or political parties shall not be based on any religious background or foundation"; independent candidates were banned from running for president; and anti-terrorism legislation that gave the security forces sweeping powers to detain suspects and restrict public gatherings was introduced.
At the beginning of 2011, anti-government demonstrations, apparently encouraged by the Tunisian street protests which prompted the sudden departure of Tunisia's President Ben Ali, kicked off across the country.
Though many members of the Ikhwan joined the protests, they maintained a low profile. The group's traditional slogans were not seen in Cairo's Tahrir Square.
But as the protests grew and the government began to offer concessions, including a promise by Mr Mubarak not to seek re-election in September 2011, Egypt's largest opposition force took a more assertive role.
In the first parliamentary elections after Mr Mubarak's overthrow in February 2011, the Ikhwan's newly formed Freedom and Justice Party (FJP) won nearly half the seats in the People's Assembly, eclipsing the earlier performances of independents allied to the movement.
The ultraconservative Salafist Nour party came second, meaning that Islamists controlled 70% of the seats in the lower house. There was a similar outcome from elections for the upper house, the Shura Council.
This allowed the Ikhwan and their allies to control the selection of candidates for the 100-member constituent assembly tasked with drafting Egypt's new constitution, prompting criticism from liberals, secularists, Coptic Christians, young people and women, who complained that the panel did not reflect the diversity of Egyptian society.
Concerns that the Ikhwan might be seeking to monopolise power were heightened when they announced they would field a candidate in the presidential election, despite having previously promised they would not.
In 2012, the FJP's then chairman, Mohammed Morsi, became Egypt's first democratically elected president. He won 51% of the vote in a deeply polarising run-off against retired air force commander Ahmed Shafiq.
Mr Morsi sought to reassure opponents of the Ikhwan by insisting that as president he wanted to build a "democratic, civil and modern state" that guaranteed the freedom of religion and right to peaceful protest.
Significant public opposition to Mr Morsi and the Ikhwan began building in November 2012.
Wishing to ensure that the constituent assembly could finish drafting the new constitution, the president issued an interim constitutional declaration granting himself far-reaching powers. He agreed to limit the scope of the declaration after days of opposition protests, but there was further outrage at the end of that month when the constituent assembly approved a rushed version of the constitution - despite a boycott by liberals, secularists and the Coptic Church, who said it failed to protect freedom of expression and religion.
As opposition mounted, President Morsi issued a decree authorising the armed forces to protect national institutions and polling places until a referendum on the draft constitution was held in December 2012, which critics said amounted to a form of martial law.
The army returned to barracks after the charter was approved, but within weeks it was forced to deploy in cities along the Suez Canal to halt deadly clashes between opponents and supporters of Mr Morsi and the Ikhwan. At the end of January 2013, the military warned that the political crisis might "lead to a collapse of the state".
In late April, opposition activists set up the grassroots Tamarod (Rebel) protest movement. It focused on collecting signatures for a petition, which complained about Mr Morsi's failure to restore security and fix the economy, and accused him of putting the Brotherhood's interests ahead of the country's as a whole. Tamarod also organised mass protests to mark the first anniversary of the day Mr Morsi took office. On 30 June 2013, millions of people took to the streets to demand his resignation.
The unrest and rising death toll prompted the military to warn Mr Morsi on 1 July that it would intervene and impose its own "roadmap" if he did not satisfy the public's demands within 48 hours and end the political crisis.
On 3 July, the military deployed troops and armoured vehicles in the streets. It declared that the constitution had been suspended and the chief justice of the SCC would assume presidential powers, overthrowing Mr Morsi.
The Ikhwan denounced the "military coup against the elected president and the will of the nation", and vowed that they would refuse to deal with Egypt's interim leaders.
Brotherhood supporters set up protest camps in Nahda Square and near the Rabaa al-Adawiya mosque and refused to disband them, despite repeated calls by the interim government.
After weeks of deadlock, hopes rose that the protests would remain peaceful. However, on 14 August security forces swept into the camps and the authorities imposed a state of national emergency.