German Chancellor Angela Merkel says the potential benefits resulting from the influx of migrants and refugees far outweighs any dangers.

Merkel told German lawmakers Thursday that "the opportunities are much bigger than the risks, we just have to recognize and use them."

She spoke hours after European Union leaders in Brussels agreed a series of measures to tackle the migrant crisis that has seen hundreds of thousands of people stream into the continent from Africa, the Middle East and Asia.

Merkel said the bloc still needs to agree a "permanent system for a fair distribution of refugees across member states."

Seeking to reassure state governors, whom she is meeting with later in the day, Merkel said Germany can meet the challenges.

"Who — if not we — has the strength to do so," she said.

European Union leaders managed to agree early Thursday to boost border controls to manage the influx and to send 1 billion euros ($1.1 billion) to international agencies helping refugees at camps near their home countries.

The leaders also said that task forces of European experts sent to help register and screen migrants in so-called hotspots must be fully operational in Greece and Italy, and perhaps also Bulgaria, by November.

"The measures we have agreed today will not end the crisis. But they are all necessary steps in the right direction," EU Council President Donald Tusk said at the conclusion of the more than seven-hour meeting.

Hungarian Prime Minister Viktor Orban, who ordered a fence built along the Serbian border to keep migrants out of his country, said after the meeting that he was willing to consider allowing them to go through to other destinations.

Orban cited Austrian Chancellor Werner Faymann, who "clearly said that if we can only stop them with the fence, then we should rather let them through. This is what must be considered."

With thousands streaming to the Balkans, tensions rose between Serbia and Croatia. Serbia banned imports of Croatian goods Thursday to protest the closure of the border to cargo traffic, which has cut Serbia off from its main trading partners in Europe.

Croatia retaliated by barring vehicles with Serbian license plates from entering the country. "I planned to open the border tomorrow (Thursday), but now I won't," Croatian Prime Minister Zoran Milanovic said in Brussels after Serbia retaliated. "We have to react to this now."

Croatia shut all but one of its crossings with Serbia to block the migrant surge, which reached nearly 45,000 in a week. Croatia is angry that Serbia is busing migrants to its border, rather than sending them north to Hungary.

"We are not happy with this (the countermeasures), but those are the measures to protect our statehood," Serbian Interior Minister Nebojsa Stefanovic said.