Asylum seekers wait inside a train to depart to a refugee camp, after crossing the border into the European Union's visa-free Schengen travel zone, in Szeged, Hungary, Aug. 27, 2015. Hungary made plans Wednesday to reinforce its southern border with helicopters, mounted police and dogs, and was also considering using the army as record numbers of migrants, many of them Syrian refugees, passed through coils of razor-wire into Europe. Reuters/Bernadett Szabo

Police in the Czech Republic detained more than 200 refugees on a train and used markers to write registration numbers on their forearms -- a move that some said called to mind Nazi Germany's treatment of concentration-camp prisoners. The measure outraged many human rights activists in the country, but Czech officials defended the practice, Agence France-Presse reported.

Police on Tuesday stopped the refugees traveling by train from Austria and Hungary. Law enforcement officers used markers to assign numbers to the 214 refugees, who were primarily from Syria and had valid train tickets.

Police then detained some of the refugees for interrogation at police stations in several Moravian towns, the Czech news site Britské listy reported.

Those detained were headed to Germany, but Czech officials said police began marking refugees to keep track of the many children.

"Our goal is to prevent the children from getting lost," Czech Interior Ministry spokeswoman Lucie Novakova told AFP.

The refugees were among the 4.5 million Syrians who have been displaced in recent months as they attempt to escape war and the horrors of the Islamic State group, also known as ISIS or ISIL.

The Czech Republic's government has said it would take in 1,500 refugees as long as the government can handpick them. The number is just a sliver of the refugees who have applied for asylum in Europe. More than 83,000 people applied for refugee status in Germany in the first three months of 2015.

“The Czech Republic for a long time was a homogenous society, so we are not used to different races and cultures,” Ondrej Benesik, a member of the Czech Parliament said. “A lot of people would say, ‘You are racist’ or ‘You are xenophobic.’ … We are just more cautious.”

The practice of marking people was an attempt to keep a record of family members in large groups of refugees, Czech police spokeswoman Katerina Rendlova said. “We also write the code of the train they have arrived on so that we know which country we should return them to within the readmission system," she said.

Rendlova said refugees “used to get the numbers on a piece of paper, but they kept throwing them away."

Some activists argue that the police do not have the right to mark the refugees. “There is no law allowing the police to mark people like this,” Zuzana Candigliota, a lawyer with the Czech Human Rights League, told AFP.

Others have questioned whether they consented to the markings. “Do they have a signed approval form in their native tongue?” Prague lawyer Marek Dufek said.