The goal was to quell regional uprisings and modernize the Persian army, but as a result of pressure from Russia and the United Kingdom, Sweden decided to call back most of their officers during World War I. Persia was rather unstable in the early 1900s, making the roads difficult to traverse due to frequent raiding by insurgents.
Because of this (and fearing British intervention), the Persian government searched for a neutral power that could help modernize and create a gendarmerie able to fight off the insurgents.
Even though the battles were bloody and Swedish officers were at serious risk in Persia, many decided to join the gendarmes attracted by better pay and opportunities than in Sweden.
The Swedish government complied and started steadily calling their deployed officers back until none remained in 1916.
Several Swedes and Persians died in combat with the insurgents between 1914 and 1916 in conflicts such as the Battle of Bouin and that of Qazvin when the gendarmes captured 8,000 sheep.