The occupation of the Philippine city of Marawi by Islamic militants has been a regular fixture in the news cycle for over a month now.
The recent shooting of ABC journalist Adam Harvey by militants linked to ISIS brought it brutally close to home for many Australians, but conflicts of this nature are not a new phenomenon in the Philippines.
Islam has been a potent force in the country since the 1400s, predating even Christianity's arrival.
So, as tensions in the predominantly Catholic nation are reaching boiling point, we take stock of the long and volatile history of Islam in the Philippines.
Islam officially arrived in the province of Sulu, a small archipelago in the south, in the 13th Century. Some insist it came even earlier with the rise of Arab traders in the 10th Century.
Either way, there were well established sultanates (periods of time when sultans ruled) in Sulu and Mindanao by 1450.
As commentator Victor Taylor, who's worked in the Muslim majority areas of the Philippines for the last 50 years, puts it:
"The country we know as the Philippines did not come into existence until the end of the 16th Century.
"So Islam, not just as a religion but as a political force … antedated the Philippines by a century or more."
Patricio Abinales, a professor of Asian studies at the University of Hawaii, says the sultanates were relatively civilly advanced for the time.
"The sultans that dominated this period spoke six languages, were trading with China and familiar with other sultanates in the maritime South-east Asia region," he says.
But Filipino writer and journalist Criselda Yabes argues this progress came at a cost.
"They were an economic superpower, they were wealthy, because of slavery," Yabes says.
Invasion by the Spanish
When the Spanish arrived in 1521, they quickly became established in the central and northern regions of what is now the Philippines.
They faced strong resistance though, when they attempted to move south.
As Dr Abinales says, the Spanish were essentially "in a defensive position vis-a-vis the Muslim sultanates, especially because the sultanates were conducting so-called slave raids into central and the northern Philippines very frequently, and the Spanish couldn't stop it".
Only towards the latter part of 19th Century did the Spaniards get a foothold in certain Muslim areas — but they never had effective sovereign control.
In fact, it wasn't until the arrival of the Americans that Sulu and Mindanao fell under foreign control.
An unusual ally
The Americans gained control over the Philippines in the Treaty of Paris in 1898, which ended the Spanish–American war.
In the northern and central regions of the country the Americans governed with civilian politicians, but in Mindanao, the first 10 years of American rule was via the United States Army.
"The Army realised the Muslims were not Filipinos, so many American soldiers were actually pushing for Mindanao and Sulu to be separated from the Philippine colony," Dr Abinales says.
When, in 1916, the US Congress passed the Jones Law that promised the Philippines eventual independence, the Muslim community reacted badly.
"The Christians and the Muslims have different ways of life and will never be able to get along," Taylor says.
He says concerns about Christian sovereignty meant the Muslim community would have preferred to either stay under the administration of the US, or be given their own independence.
"In a very strange way the Muslims found an unusual ally in the American colonisers," Dr Abinales says.
Post-Filipino independence in 1946, relations between the Muslim and Christian communities were strained but essentially peaceful.
"The Muslims were very modern," Yabes says.
"It was very cosmopolitan in a way. People were getting together and talking about books and music and movies. But then martial law was imposed and that's when the problems started."
When the now infamous Ferdinand Marcos was elected as president of the Philippines in 1965, tensions in country's south began to boil over.
Dr Abinales says it came down to three main factors.
Firstly, increasing numbers of Christian settlers were moving into Muslim areas and competing with Muslim and indigenous communities for land.
Secondly, there was Marcos's declaration that Mindanao was to be the centrepiece of his national economic development plans.
And thirdly, a number of young Muslim Filipinos travelled to Egypt to study at Cairo's Al-Azhar University, where they were inspired by Nasserite nationalist movements.
The result? By 1975, members of the Filipino Muslim community had organised and created a semi-militarised resistance movement.
Resistance by the Moro National Liberation Front
The resistance movement, the Moro National Liberation Front (MNLF), brought together the students who had studied in the Middle East, the old Muslim elite and ordinary Muslim communities who felt threatened by the growing Christian settler communities.
The movement was supported by at least two international backers: the Libyan Gaddafi government, who sent Muslim Filipinos arms to help in the resistance, and the Malaysian government, who provided the militants with access to training camps in Borneo.
The MNLF's demands were reasonably simple: they wanted Mindanao, Sulu and the island of Palawan, in the country's west, to secede from the Philippines proper.
The Marcos government refused and bloodshed ensued.
"There was great devastation," Taylor says of the war years.
"If you've been following what's happening in Marawi today, that's what happened in the capital of Sulu, Jolo, in 1974.
"It was flattened by bombardments from the [Filipino] navy ships and air force. There was continuous fighting between Muslims and the military … even civilian Christian groups set up paramilitary forces."
It is estimated that 150,000 people were killed in the insurrection and by 1976, seeing no way to victory, the MNLF had begun peace talks with the Marcos administration.
Signing of the Tripoli Agreement
In 1976, the Philippine government and Libya signed the Tripoli agreement, which contained two stipulations.
The first, that the Philippine government would recognise the importance of Muslim autonomy and the second that the MNLF would dispense with their separatist agenda and rule the provinces with semi-autonomy.
But according to Dr Abinales, the agreement was ineffective.
"What Marcos did was to mess it up. The Tripoli agreement was never implemented properly," he says.
Some members of the MNLF saw the agreement as a too much of a compromise, which led to the emergence of a splinter faction, referred to as the Muslim Islamic Liberation Front (MILF).
Rise of globalised jihadism
At the same time MILF broke away, numerous groups of a more extremist best were beginning to spring up around South-east Asia, including the infamous Jemaah Islamiah in Indonesia, and the radical Abu Sayyaf elsewhere in the Philippines.
It was also during this period, the later decades of the 20th Century, that Al Qaeda began to support radical Islamist groups around the world — including Abu Sayyaf, who claimed responsibility for the worst terrorist attack in Filipino history: the bombing of Superferry 14 in 2004.
In the early 2000s, the Filipino government attempted to quell a number of insurrections, including the attempted takeover of a small town in Lanao de Sur, another southern province, by a MILF breakoff group.
With all these players in the mix, compacted by very active drug and crime syndicates operating in the area, there is a complexity to the country's current tensions, Dr Abinales says.
And to many Filipinos, including Yabes, it's just another iteration of an longstanding cycle.
"One group was formed, a breakaway, they fight, get close to negotiating with the government, something happens again and so that falls apart," Yabes says.
"It's like a never-ending story."