Hungarian Prime Minister Viktor Orban clashed with German Chancellor Angela Merkel over migration on Thursday after the two met in Berlin for the first time in three years.

The two leaders have opposing views on the issue, with Orban spearheading a drive against European asylum policies defended by Merkel.

In a joint press conference following the talks, divisions between the pair were clear.

Orban argued that closing borders was the only way to deal with migration.

"If the help offered by Europe to migrants leads people in Africa and Asia to conclude that they can come, then they will come," he said.

"We have to be humane without creating a pull-factor, and the only way we know of doing that is closing the borders and taking help (to those countries), and not let in people who bring trouble."

Merkel, meanwhile, said the issue was about "humanity".

"The soul of Europe is humanity and if we want to retain this soul and play a role in Europe with these values then Europe can't simply decouple from the need and suffering," she said.