Bosnian police dismantled a migrant makeshift camp in the tourist centre of Sarajevo on Friday and transferred some 250 people to an accommodation centre in the country's south.
Since the beginning of the year a growing number of migrants have carved a Balkan route through Bosnia to reach the European Union raising fears of a humanitarian and security crisis in the impoverished country.
The two-hour operation in Sarajevo started at 6:00 am (0400 GMT) and ended without incident.
The migrants, mostly young men, but also including some families with children, boarded buses that will transfer them to Salakovac, near Mostar, some 100 kilometres south of Sarajevo.
There they will be accommodated in a former refugee camp, set up after the 1990s Balkans wars and that has been rearranged for the new tenants.
The centre can receive around 300 people.
"There was no violence or incidents ... people left voluntarily," Peter Van Der Auweraert, head of the international Organisation for Migrations (IOM) Bosnia mission, told AFP.
He said the humanitarian situation in the makeshift camp was worsening.
"The number of tents was growing, it was raining this week, hygienic and health situation was really very bad."
Some 4,000 migrants entered Bosnia this year, according to the government.
The IOM puts the figure at 3,600 of whom 2,500 were still in Bosnia while the others left the country.
The authorities reported between 80 and 150 daily entries from Montenegro and Serbia in May.
The numbers are by no means comparable with the hundreds of thousands of people who took to the so-called Balkans route in 2015, before it was closed in March 2016. But that route avoided Bosnia's mountainous terrain.
Bosnia has no means to handle a major migrant crisis, its leaders said and called for financial and technical aid from the EU and the United Nations.