(CNN) Hungary closed one of the main routes Tuesday that migrants are using to reach the European Union -- plugging the final hole in its border fence with Serbia, implementing harsh new rules for anyone attempting to enter illegally and leaving hundreds massed on its border.

A railway carriage fortified with razor-wire was wheeled in to block the remaining gap in the fence with neighboring Serbia, closing a route that tens of thousands of refugees have used to escape bombings and terrorism in their homelands.

Refugees were trickling into Hungary, according to a government spokesman.

Zoltan Kovacs told CNN's Hala Gorani that 70 people had their asylum applications accepted and 40 were rejected. About 275 people were arrested at the border.

"Thirty-five of them, mainly women and children, have already been transferred to shelters within the country, according to the European protocol," Kovacs said.

Hungary is a member of the European Union; Serbia, to its south, is not but is in negotiations to join.

JUST WATCHED Refugees tell their stories of fleeing poverty and war Replay More Videos ... MUST WATCH Refugees tell their stories of fleeing poverty and war 02:20

Under laws that took effect Tuesday, anyone caught climbing the fence faces up to three years in jail. Hungarian authorities said arrests had already begun.

"We call this as a temporary fence. Obviously it is ... a must decision (rather) than a nice decision," Kovacs said.

"We don't like building fences, but up until we are able to reinstate border control on the natural border/green borders of the country, we have no other choice."

Registration and entry to Hungary will now be possible only at two assigned entry points, he said.

Hungary also plans to expand the fence along its border with Romania to the east, Norbert Domotor, spokesman for the Hungarian Ministry of Foreign Affairs, said on Tuesday, although he said construction had yet to begin.

In a statement, Amnesty International slammed Hungary's actions as "ugly" and "draconian."

A migrant child in Serbia gazes through the gate to Hungary.

"For refugees fleeing from terrifying conflict zones to be met by such an intimidating show of militarized force is shocking, and a woefully irresponsible response to people already traumatized by war and brutality," said Gauri van Gulik, Amnesty International's deputy director for Europe.

"This 'raise the drawbridge' mentality will simply redirect, but not put an end to, desperate and dangerous journeys."

Unprecedented influx

Hungarian authorities took action after an unprecedented influx of migrants entering from Serbia.

A record 9,380 migrants made the crossing Monday, Hungarian police said, nearly double the previous record of 5,809 migrants set a day earlier.

The closing of the border left throngs of refugees, carrying everything they had on their backs, stranded on the Serbian side.

At the main border crossing, a crowd of more 1,000 gathered as a Hungarian police helicopter circled overhead.

Migrants banged on the fence, chanting, "Open, open"; children peered at Hungary through the cracks and asked when the border would open again.

Migrants gathered at the Serbian-Hungarian border chant, "Open, open."

Some pitched tents, and aid workers brought them food and water.

U.N. workers and Serbian authorities encouraged people to relocate to a camp about 10 kilometers (6.2 miles) from the border, but few took them up on the offer in case they missed a temporary opening of the border.

Stephane Moissaing of Doctors Without Borders said he had seen authorities open the border crossing twice Tuesday, with several hundred people rushing through each time.

Simka Somer, vice president of the Red Cross in Serbia, said refugee camps in Serbia had largely emptied as migrants made for the border.

The Kanjiza camp, the biggest in Serbia and closest to the Hungarian border, had about 30 migrants staying on Tuesday, according to Ivan Miskovic, spokesman for Serbia's Commissariat for Refugees and Migration.

By contrast, Red Cross worker Monika Cesko said she believed 6,000 to 7,000 people were at the camp over the weekend.

Serbian official: 'We know how it feels'

Aleksandar Vulin, Serbia's minister of labor, employment, veteran and social policy, said Hungarian authorities had not coordinated with his country on plans to close the border.

"We heard some rumors that they would close some border, but officially we received nothing," he said.

"We want the migrants to be able to travel freely without criminals and smugglers," he said, adding that "every migrant had an opportunity to apply for asylum and travel through Serbia."

His government was taking care of about 5,000 migrants, providing food water and medical supplies, and busing those who accepted a ride to the camps.

"We know how it feels; we are Serbs," he said, referring to his country's war-torn recent past. "We are always sympathetic to people who suffer."

Migrant children in Serbia peer across the border to Hungary.

Call for emergency summit

At a news conference in Berlin, German Chancellor Angela Merkel and her Austrian counterpart, Werner Faymann, announced they had called for an emergency EU summit in one week to address the escalating crisis.

"We cannot wait until the middle of October," said Merkel, calling on European countries urgently to formulate a response.

The German leader said three European countries were "actively trying to do something" to resolve the crisis.

"Germany, Austria and Sweden cannot solve the problem on their own," she said.

Faymann echoed Merkel's call for cooperation, adding that European countries need to face the crisis as one and cannot simply "pretend to be ostriches."

Germany is the most welcoming European country for migrants, having pledged €6 billion ($6.8 billion) to take in 800,000 migrants. By the end of the year, it might take in 1 million migrants, its vice chancellor said.

EU officials met Monday in an emergency session in Belgium but didn't finalize a plan.

"It was too early for a decision to be taken today," Jean Asselborn, Luxembourg's minister of foreign affairs and immigration, said Monday.

The September 22 meeting will be a followup session, Asselborn said Tuesday.

Pope's thoughts on ISIS threat

Pope Francis revealed Monday that he is concerned that terrorist groups, such as ISIS, could be hiding among the thousands of refugees streaming into Europe.

"There is a danger of infiltration," Pope Francis said in an interview to Portugese Radio Renascenca. "Nobody said Rome would be immune to this threat. But you can take precautions."

"I recognize that, nowadays, border safety conditions are not what they once were," the pontiff said. "The truth is that just 400 kilometers (249 miles) from Sicily there is an incredibly cruel terrorist group," he said.

Nonetheless, Pope Francis stressed that immigrants should not be turned away.

"If a refugee arrives, despite all the safety precautions, we must welcome him," he said.

On Tuesday, Vatican spokesman Federico Lombardi downplayed the Pope's comments on ISIS.

"The Holy Father was speaking in a general way," Lombardi said. "There is no immediate threat to the Vatican at the moment."

Migrant boat sinks

Many migrants don't even make it onto European soil. More than 2,800 have died or disappeared trying to get to Europe this year.

JUST WATCHED Syrian refugees swim to Europe Replay More Videos ... MUST WATCH Syrian refugees swim to Europe 02:29

On Tuesday, a migrant boat headed to Greece sank off the coast of Turkey, killing at least 22 people, the Turkish coast guard said. So far, 249 people have been rescued.

The sunken boat was found off the Turkish island of Kara Ada, in Bodrum Bay. The boat was headed to the nearby Greek island of Kos, the semi-official Anadolu News Agency reported.

At least 72 migrants have died since the weekend trying to make the same crossing, the International Organization for Migration said Tuesday.

Migrants arriving in Turkey often speak of cruel smugglers who ignore worsening weather conditions and force people on overcrowded rubber boats to squeeze a bigger profit, said EU Frontex, the joint European Union border patrol.

More than 430,000 migrants have fled to Europe so far this year, the International Organization for Migration said.

The domino effect

Many refugees are trying to escape the carnage and devastation in Syria, Iraq and Afghanistan. Their ultimate destination: Germany.

JUST WATCHED Germany toughens border security Replay More Videos ... MUST WATCH Germany toughens border security 01:33

But to get there, migrants typically cross the Mediterranean Sea and go through Greece, Macedonia, Serbia, Hungary and Austria before finally reaching Germany.

And when Germany announced tougher border controls this week, countries down the chain followed suit -- likely fearing an intense backlog.

On Sunday, Germany increased ID checks at the border and temporarily stopped trains coming from Austria.

On Monday, Austria sent 2,200 soldiers to its border to help overwhelmed police.

And Tuesday, Hungary enacted new border laws. It's also creating new border transit zones to hold asylum-seekers while their applications are processed. These will result in asylum procedures that are "swifter and more effective," the government said.

Migrants in the transit centers won't be considered to have officially entered Hungary, the government said.

The European Union is still trying to figure out how to distribute 160,000 migrants -- and whether to set quotas for member countries to absorb them.

JUST WATCHED Migrants try to cross from Greece to Macedonia Replay More Videos ... MUST WATCH Migrants try to cross from Greece to Macedonia 01:59

That number includes 40,000 from Italy and Greece that the EU had already agreed to relocate. Another 120,000 need placement.