When Sergeant Major John Spence was first deployed in the Solomon Islands in 2006, locals weren't afraid to throw rocks at armed Kiwi soldiers when their backs were turned.
There was rioting in the streets and parts of Honiara were burning to the ground in protest at the recent elections.
But New Zealand troops left the country on Friday, confident their efforts had helped make a change.
Sergeant Major Spence arrived back in Burnham, near Christchurch with a platoon of about 45, which is expected to be the last Kiwi unit to serve on the island.
The latest four-month stint coincided with Tonga's withdrawal and the two leaving platoons were replaced by Australian and Papua New Guinea defence forces.
The groups make up the Regional Assistance Mission to the Solomon Islands (Ramsi), which was started in 2003 after the then-president, Sir Allan Kemakeza, asked for international assistance.
The country had been embroiled in a civil war for years. Tensions had flared between the Gwale, the indigenous population of the main island, Guadalcanal, and the Malaitans from the neighbouring island of Malaita.
The latter had moved to Guadalcanal in search of work, but the rebel Isatabu Freedom Movement forced them from their homes.
Things improved after the arrival of 2200 police and troops from the Australian-led Ramsi. Weapons that had been stolen from the police armoury were seized from militants and hundreds of police officers were sacked as the country attempted to eliminate corruption.
But violence broke out again in 2006 after the appointment of Prime Minister Snyder Rini, amid allegations that the election was fixed and that his campaign was funded by Chinese businessmen.
Parts of Honiara were razed and looted, with Chinese-owned property on a strip in the city targeted.
"We came in as a response to that rioting," Sergeant Major Spence said.
"We landed in the middle of the night. Chinatown was still burning, so to speak. Tension was very much high.
"Our primary task was to secure, stabilise the environment. A curfew was imposed and our job was to ensure that was adhered to.
"Yes, we had to detain some people. They won't confront you ... because we've got weapons, so they'll wait until we're not looking, and then they'll throw stuff. We were able to catch and detain people when we can. Nine times out of 10 they'll run away because they're quite fast and it is their land, they know short cuts."
The soldier returned to the Guadalcanal Beach Resort in Honiara, where the troops are based, for the second time this year and immediately noticed a change. The Duke and Duchess of Cambridge had enjoyed a successful visit, with the Solomon Islands police taking a lead role in the tour security.
The All Whites joined other international teams in Honiara for the Oceania Football championship, islands from across the region arrived for the Pacific Arts Festival and the locals celebrated the country's 70th anniversary of World War II.
"You no longer have that tension, you no longer have that insecurity," Sergeant Major Spence said.
"And by that I mean, when the locals are looking at you, you can tell by the way they respond.
"In 2006 there was no confidence because the police force were part of the problem. Now, there's a lot more ownership.
"I feel like we've done our job, we don't need to be here. Locals will disagree, they love having us here ... it gives them confidence."
The country now had a big focus on tourism, he said.
"Back then, no one wanted to come here. In fact, I saw one or two expats, or non-locals - because they stick out - and they wanted to get out ... Now, you see a lot more people that are non-local, a lot more tourists and it's great."
Locals were also more keen to make a living.
"For example, the beach fronts - it's all privately owned - you get a lot more of the locals insisting that people use their beaches, obviously for a fee," he said.
"It's those entrepreneurial opportunities that are definitely present now. Back then, yeah, they wanted you on their beach, but it was for a different reason, to help with security. Now it's money."
The soldier was greeted at Christchurch Airport on Friday by his wife Kathy, an administrator in the Army, and grandson Daimhin, 4 months, who was born while he was away.
Holding the new arrival, he said: "He's pretty cute ... but it's my eighth deployment, so you get used to being away."
Land component commander, Brigadier Mark Wheeler, said Ramsi troops were now a "sixth-tier response" when there was a problem on the islands. It meant there were five layers of local policing that responded to disorder before the military stepped in.
"Now it's the Solomon Islands police force that's on the frontline. They're the tier-one response. They weren't years ago. It would have been the multi-nationals going out there. So now it's a Solomon Islands face to a Solomon Islands problem.
"Ramsi military really has not been used for a number of years. This is a really big success story, to the point where the military is not needed and we can start to fade out."
Several soldiers said they had seen more violence at home than on the islands.
"While we've been here, Sydney has had a range of shootings," said Brigadier Wheeler.
"If you look at the newspapers from Australia/New Zealand, there are always violent incidents going on ... you don't get that in the headlines here. There is a comparison that can be made."
Locals were helping to enforce the law, with a handful at the Pacific Arts Festival spotting pick-pocketers and taking them to police officers.
"The people are at peace," Brigadier Wheeler said.
"Yes, there could be flare-ups. Yes, there will be crime and law and order issues and there might even be a riot at some point, they're not uncommon in some societies. It's a very good sign they're willing to point out someone who is breaking the law."
The country is known for its high rates of domestic violence, but Lance Corporal Karl Johnston, part of the Waikato Mounted Rifles, said he hadn't seen it.
"None of the blokes I've met have been violent ... I've never seen a female on this island with a black eye.
"It's very peaceful here ... of course when you get large groups of unemployed men together, you're bound to get problems but it's no worse than South Auckland, that's for sure, and probably a darned sight safer."
The Herald accompanied some of the soldiers to the local markets in Honiara to see how they interacted with the residents. Locals appeared at ease, smiling and talking to the troops.
"The general population trust soldiers far more than their own police," Lance Corporal Johnston said.
"I don't know whether you've seen in small towns in New Zealand, all the kids come out to wave? It's the same here.
"I'd love to come back in a few years and see what they've done with the place."
Moe Loli, 47, was selling necklaces from a stand at the market when the soldiers visited.
"We love it when they come to our country," she said.
"When they leave, we will feel sorry and sad. They help the country."
The biggest threat on the island was the parasitic hookworm, with which Lance Corporal Johnston became infected soon after arriving.
He was bedridden for days with "agonising stomach pains".
The platoon medic, Lance Corporal Sophie Woodman, 23, who is based at Linton in Palmerston North, has treated several soldiers for the worm, which often enters the body through exposed feet when walking through grass.
Patients can experience coughing, chest pain, wheezing, fever, vomiting and diarrhoea, and in severe cases, cardiac failure will occur.
Despite being the only woman in the platoon, Lance Corporal Woodham said she didn't feel outnumbered.
"It's like having a platoon of younger - mostly - brothers."
All Ramsi troops are expected to pull out in mid-2013. The final decision lies with the Australian Government.
But after a rousing haka on Thursday as New Zealand handed over the reins to the Australian and Papua New Guinean forces, they left their shirts on the base field as a symbol of their willingness to return should they be needed.
The country's next elections are in 2014, but the 2010 elections appeared to run relatively smoothly, although there were concerns about voter registration irregularities.
Danny Philip was elected as Prime Minister.
A combined international police force will still have a presence on the island for the foreseeable future, and other civilian appointments as part of Ramsi will continue to work with the Solomon Islands.
The Kiwi contingent has been scaled back to 17 police officers, after three returned with the troops on Friday. It started with about 30 officers in 2003.
Superintendent Ged Byers, who heads the police contingent, said: "The focus has moved away from what was generally considered operational-type policing and working alongside, hand-in-hand, guiding the local police. Now we're moving into a transitional period."
There had been a significant improvement in the Solomon Islands police force in the past 10 years.
"I think an increase in their ability to investigate, they're very solid with serious crime, and I think their ability to respond at street level.
"There's still some way to go but I would say that in almost any policing community," he said.
"You have to change when your environment changes and modernise."
Anatomy of a conflict
Fighting begins between the Gwale, the indigenous population of Guadalcanal, and the Malaitans from neighbouring Malaita after the latter move to Guadalcanal in search of work. The rebel Isatabu Freedom Movement forced thousands from their homes. About 20,000 Malaitans fled to the capital of Honiara, while others returned to their home island. Gwale residents in Honiara fled making the city become a Malaitan authority.
The Malaitan Eagle Force joins the country's police and stages a coup against the Prime Minister, Bartholomew Ulufa'alu.
The Townsville Peace Agreement is signed, in the hope hostilities will end.
But one of the Isatabu militia leaders, Harold Keke, refused to recognise the deal and was linked to a spate of murders near his Guadalcanal stronghold.
Finance Minister Laurie Chan resigns after being forced at gunpoint to sign a cheque made out to some of the militants.
Prime Minister Kemakeza requests military aid from Australia and New Zealand. Foreign ministers from several Pacific countries express their support and the Solomon government approves a peacekeeping plan.
The Regional Assistance Mission to Solomon Islands (Ramsi) is formed and 2200 defence staff arrive from Australia, New Zealand and other Pacific nations.
Harold Keke surrenders to the peacekeepers after negotiations.
Violence breaks out again after the appointment of Prime Minster Snyder Rini amid allegations that the election is fixed.
Elections run relatively smoothly, although there are concerns about voter registration irregularities. Danny Philip is elected as Prime Minister.
NZ's 16th Ramsi platoon, likely to be its last, returns satisfied law and order has been restored. Other forces are expected to pull out by mid-2013.
Ramsi's current mission
*Supporting local police.
*Strengthening the justice system and rehabilitation of prisoners.
*Strengthening the economy.
*Improving electoral system.
*Improving rights and opportunities for women.
*Improving the media.
45 in NZ's returning platoon
16th NZ platoon on the islands
163 in current joint-Ramsi platoon
8 NZ military headquarters staff still on the islands
4 months: standard placement for a NZ platoon
17 NZ police staff on the islands
244 police from all nations