Asia Pacific leaders usually focus on economics at the Asia-Pacific Economic Cooperation (APEC) summit, but have taken a strong stance on terrorism at the close of this year's meeting.
The leader's declaration at the close of the APEC summit in Manila, which usually concentrates on economic matters, highlighted the need for greater co-operation to improve security and counter violent extremism.
"Under the shadow cast by the terrorist attacks in Paris, Beirut, and against Russian aircraft over the Sinai, and elsewhere, we strongly condemn all acts, methods, and practices of terrorism in all their forms and manifestations."
Prime Minister John Key said discussions covered how terrorism had little effect on global growth, despite the terrible devastation it brought to families and communities.
"There's concern about what they're doing and the impact on the morale of people and the tragic loss of life. But not seen in a context that would destabilise global growth.
"The general feeling is that we've had terrorism for a long period of time in different forms, and so the world would cope with it, but obviously it was a terrible thing."
Focus on South China Sea
Tensions in the South China Sea had dominated many of the bilateral talks between leaders during the summit.
US president Barack Obama called on China, which claims most of the resource rich area, to stop reclaiming lands in the disputed waters.
China repeated that its dredging work is legal.
But Mr Key said there was no discussion on it at the leader's retreat.
"The bulk of leaders are going off to the East Asia Summit and that's typically where we've talked about regional security issues. I'm pretty sure that will be a significant part of the interventions there."
TPP v FTAAP
The declaration outlined efforts to promote trade following slowing economic growth in the region, which accounts for 60 percent of global output and nearly half of world trade.
The leaders of the 12-nation Trans-Pacific Partnership, or TPP, met for the first time at APEC and talked about getting the deal signed and implemented as quickly as possible.
Analysts say that may not be easy, particularly in the US, where there may be significant resistance in Congress.
Nevertheless, Mr Key is pushing TPP, which does not include China, as the logical answer to speed up free trade in the region.
South Korea, the Philippines and Indonesia are keen to join.
But Chinese President Xi Jinping had a different message.
Speaking to business leaders on Wednesday, Mr Xi warned about the potential of fragmentation from the various regional free trade arrangements.
He said he was keen for the 21 countries to get in behind the China-led Free Trade Area of Asia and Pacific, or FTAAP, which aims to bring all APEC economies together under one trade umbrella.
"We therefore need to accelerate the realisation of FTAAP and take regional integration forward."
Protests in the street
Large protests took place on the streets of Manila, while leaders were attending the Apec summit.
Hundreds of people from indigenous, student and labour groups clashed with police, who deployed water cannon. Police also used Katy Perry pop songs to disperse protesters.
Her hit song, Roar, was played at full volume.
The protest playlist included Dolly Parton's Islands in the Stream, David Guetta's Sexy Bitch and the Bee Gee's How Deep Is Your Love.
To add a bass beat, some of the police tapped their batons against their shields in time with the music.
As the protesters retreated to the soul classic, My Girl, a leftist member of parliament complained the tactic was ridiculous.
The Manila police say the music was aimed at de-escalating tensions and it goes well with their maximum tolerance policy during protests.
They say Filipinos love music, and it had a calming effect for everyone.
Protesters gathered on Thursday morning in the Manila Bay area, where the Apec meetings have been held.
The anti-globalisation protesters were calling for Apec to be dismantled, accusing the trade bloc of taking advantage of poorer countries.
A protest leader, Renato Reyes, told the Associated Press news agency: "Apec and imperialist globalisation have only benefited the rich countries while further impoverishing developing countries like the Philippines."
Tens of thousands of soldiers and policemen were already in place in the sprawling city to guard against disruptions and potential terrorist attacks.