Authorities said border police asked the passengers for details about their visits to Bosnia and officers decided based on the stated reasons that the Iraqis planned to pass through Bosnia while trying to get to a country in western Europe.
Border police said in a statement Thursday that the group would be flown back from Sarajevo to Istanbul, where their flight originated. In a separate incident early Thursday, authorities say eight migrants were injured during a police chase in eastern Bosnia when their car overturned.
Police say the driver of the car fled and the injured migrants have been taken to a hospital. Europe-bound migrants enter Bosnia with the goal of crossing into European Union member Croatia and continuing west.
The European Union is prolonging the mandate of its naval operation against human traffickers in the Mediterranean Sea for six months but still plans to scour its waters without any ships.
Italy's previous populist government blocked Operation Sophia from using ships because its vessels were occasionally used to rescue migrants. Planes and drones are still in action.
Extending Sophia's mandate until March 31, EU headquarters said Thursday that "the deployment of the Operation's naval assets will remain temporarily suspended."
Aid groups are shocked by the seemingly absurd prospect of a naval operation without any boats and accuse the EU of abandoning people seeking refuge in Europe.
Well over a million migrants entered Europe in 2015 but arrivals into Italy are now at their lowest levels for several years.
Malta's interior minister says that only Germany and France have maintained their commitment to take migrants under distribution pacts reached when the small EU nation permitted their disembarkation from humanitarian rescue ships.
Interior Minister Michael Farrugia told Malta state TV on Thursday that half of the migrants remain in Malta, despite deals brokered through the EU. He urged the EU and other nations to fulfil their pledges. He said the delay in relocation is putting "great pressure" on the detention center where the migrants are held.
On Wednesday, migrants being kept in the center hung up banners demanding their release in a peaceful protest. The 800 migrants being held at the Hal Safi center include migrants rescued at sea by Maltese armed forces.