Islamic State and the crisis in Iraq and Syria in maps
Interactive See how the area IS controls has changed since 2016
The jihadist group Islamic State (IS) has lost almost a quarter of the territory it controlled in Iraq and Syria over the past year, according to the latest analysis.
IS militants were in control of about 60,400 sq km (23,300 sq miles) in December 2016, compared with about 78,000 square km (30,100 sq miles) in January, the report by IHS Conflict Monitor says. This compares to a loss of about 14% over 2015.
IS came to the world's attention in June 2014, when it overran Iraq's second city of Mosul and then moved southwards towards the capital Baghdad, routing the Iraqi army and threatening to eradicate the country's many ethnic and religious minorities.
At its peak, some 10 million people were living in territory under IS control. However, a report by IHS Conflict Monitor in October 2016 suggested the figure was nearer six million.
The current focus of the battle against IS has been for control of Mosul, the jihadist group's last major urban stronghold in Iraq.
Iraqi special forces and army units have liberated the eastern half of Mosul and are now advancing into the western part of the city. However, this is expected to present more of a challenge as it includes the old city and is more densely populated with districts regarded as pro-IS.
Columb Strack, senior analyst with IHS Conflict Monitor, said: "We expect Iraqi government forces to recapture Mosul before the second half of the year".
US-backed Syrian rebels have also begun advancing on another IS stronghold, the city of Raqqa, in northern Syria.
How did IS spread across Iraq and Syria?
The jihadists exploited the chaos and divisions within both Syria and Iraq.
IS grew out of what was al-Qaeda in Iraq, which was formed by Sunni militants after the US-led invasion in 2003 and became a major force in the country's sectarian insurgency.
In 2011, the group joined the rebellion against President Bashar al-Assad in Syria, where it found a safe haven and easy access to weapons.
At the same time, it took advantage of the withdrawal of US troops from Iraq, as well as widespread Sunni anger at the sectarian policies of the country's Shia-led government.
In 2013, the group began seizing control of territory in Syria and changed its name to Islamic State in Iraq and the Levant (Isis or Isil).
The following year, Isis overran large swathes of northern and western Iraq, proclaimed the creation of a "caliphate", and became "Islamic State".
An advance into areas controlled by Iraq's Kurdish minority, and the killing or enslaving of thousands of members of the Yazidi religious group, prompted a US-led multinational coalition to launch air strikes on IS positions in Iraq in August 2014.
Exact numbers of casualties from the conflict with IS are not available.
The UN says at least 6,878 civilians were killed in acts of violence in Iraq in 2016 - although the true figure is likely to be higher as the organisation has been unable to verify some reports of casualties in the Mosul area.
The total number of civilian deaths in Iraq since August 2014 is now more than 19,700.
The UN no longer keeps track of casualty figures in Syria due to the inaccessibility of many areas and the conflicting reports from the various parties to the war there.
The Syrian Observatory for Human Rights, a UK-based monitoring group, reported in September 2016 that more than 300,000 people, including 86,000 civilians, had been killed since March 2011.
It warned that the actual death toll could be 70,000 higher as many armed groups did not report fatalities.
Who is fighting IS?
The US-led coalition has conducted more than 11,800 air strikes against IS targets in Iraq since August 2014.
The UK launched its first air strikes on the group in Iraq the following month. Other nations taking part include Australia, Belgium, Denmark, France, Jordan, and the Netherlands.
In Syria, the US-led air campaign began in September 2014. Since then, more than 8,800 strikes have been carried out by coalition forces, which include Australia, Bahrain, France, Jordan, the Netherlands, Saudi Arabia, Turkey, United Arab Emirates and the UK.
Russia is not part of the coalition, but its jets began air strikes against what it called "terrorists" in Syria in September 2015.
There is little information from official sources about the Russian air strikes. However, the Institute for the Study of War says evidence suggests Russian planes have targeted deep into opposition-held territory, and helped Syrian government forces to retake control of the city of Aleppo in December 2016.
Since then, Russia has continued to bomb Syrian opposition forces, as well as IS fighters around Palmyra - although ISW says this was in order to defend a nearby airbase, which is the Russian's main base of operations in central Syria.
Other countries targeted by IS
With the proclamation of a caliphate at the end of June 2014, IS signalled its intention to spread beyond Iraq and Syria.
IS leader Abu Bakr al-Baghdadi quickly received oaths of the allegiance from jihadist militants in Libya, and within a year affiliates held territory in five countries and had footholds in several more.
IS is now believed to be operational in 18 countries across the world, including Afghanistan and Pakistan, according to evidence seen by the US National Counterterrorism Center. It also found signs of what it called "aspiring branches" in Mali, Egypt, Somalia, Bangladesh, Indonesia and the Philippines.
During 2016, IS also claimed attacks in a number of countries including, Turkey, Indonesia, France, Belgium, Germany, the US and Bangladesh.
The proclamation of the caliphate also triggered a surge in the number of foreign fighters travelling to Syria and Iraq to join IS.
A report published in December 2015 by the New York-based security consultancy Soufan Group estimated that 27,000 foreign jihadists had made the trip from 86 countries, more than half of them from the Middle East and North Africa.
What has been re-captured?
Elsewhere in Iraq and Syria, the conflict with IS has left cities and towns in ruins. Other areas have been cut off by IS militants, leaving their populations dependent on aid deliveries and black-market food supplies.
One of the first major victories in the battle against IS was the recapture of the northern Syrian town of Kobane by Kurdish fighters in early 2015. The battle left more than 1,600 people dead and Kobane in ruins. But since then, Kurdish-led forces have driven IS militants out of thousands of square kilometres of northern Syria.
Ramadi in western Iraq also suffered widespread destruction during a months-long offensive by Iraqi troops and pro-government militia that saw IS militants ousted from the city in January 2016, eight months after they overran it.
Palmyra in Syria was one of several ancient sites that IS ransacked and demolished. Its recapture by Syrian government forces aided by Russian air strikes in March 2016 was hailed by President Assad as an "important achievement" in the "war on terrorism".
But IS members recaptured the city in December as government forces and their allies turned their attention to fighting local opposition forces in Aleppo and Damascus.
Interactive Use the slider below to compare before and after images
How does IS get its funding?
Oil was once the biggest single source of revenue for IS. The group seized control of many oil fields in Syria and Iraq, and sold oil on the black market.
But production has fallen since US-led coalition and Russian air strikes began targeting the oil infrastructure.
According to the Center for the Analysis of Terrorism, IS also lacks the technology to maintain ageing equipment, and wells are becoming more depleted, making the oil more difficult to extract.
CAT found that extortion was the primary source of funding for IS in 2015. Money raised from taxes, fees, fines and confiscations accounted for 33% of the group's income, up from 12% the previous year, it said.
As well as charging for services like water and electricity, IS levies taxes on products like wheat and cotton and it makes money from confiscating goods and property, which are then sold on.
Analysis by the IHS Conflict Monitor said IS was now so short of funds it was imposing random fines for offences like driving on the wrong side of the road.
The loss of territory and people under IS control means these sources of revenue are likely to continue decreasing.
A report in the Huffington Post in July 2016 said it seemed likely that IS was no longer generating enough revenue to fund its operations.
Where are the refugees?
More than 4.8 million Syrians have fled abroad to escape the fighting in Syria, according to the UN. Most have ended up in neighbouring Turkey, Lebanon and Jordan.
Since then a deal between the EU and Turkey has curbed the flow of migrants across the Mediterranean - although Syrians still form the largest group of asylum-seekers in Europe.
Germany received more than 740,000 asylum applications in 2016 - 268,866 were from Syrian refugees, according to the interior ministry.
The UN estimates there are more than three million Iraqis who have been forced to leave their homes to escape the conflict with IS and are displaced within the country.
The organisation has warned that the battle for control of Mosul could spark a mass exodus of another million people.