Croatian police said they put up a fence on their side of the border to block the migrants from entering. They said two officers were slightly injured by rocks thrown by migrants.
Bosnian police earlier stopped some 100 migrants from getting off a train that arrived in the area early Wednesday. Officers organized their transfer to a migrant center in the capital of Sarajevo.
Police also turned back buses with migrants on Wednesday to curb any new arrivals.
“Any increase in the numbers of migrants without adequate housing presents a potential security threat,” said regional police commissioner Mujo Koricic.
Thousands of migrants have been staying in northwestern Bosnia — many camping out in the open — while trying to cross into Croatia and journey onward to other EU countries. War-ravaged Bosnia has struggled with the influx, and some citizens have staged protests to demand a better humanitarian response from officials.
Migrants have walked to the Croatian border to draw attention to the borders remaining closed for people fleeing war and poverty. Dozens have spent the past two nights out in the open, including children.