Differences were still apparent as Szydlo and Merkel met on Friday, with Europe's refugee and migration crisis perhaps proving most divisive.

While Szydlo said Poland would play a role in the EU-wide redistribution of 160,000 people, she ruled out the concept of permanent migrant quotas.

"For Poland the permanent migrant quotas are not acceptable and we will discuss this. Poland wants to be an active EU member in solving this problem," Szydlo said at a joint news conference with Merkel.

The German government has invited Szydlo three times, but she waited almost 100 days before accepting. Since taking office in November, Szydlo has already visited six states, including Hungary. Poland's new President Andrzej Duda visited Berlin shortly after taking office.

"It's the first opportunity for an intensive, comprehensive exchange of views, which the chancellor is looking forward to," government spokesman Steffen Seibert said ahead of the visit.

Relations have been strained between Germany and Poland since the nationalist Law and Justice (PiS) party took power in Poland last November.

The EU has voiced concern about legal changes to Poland's constitutional court, making it harder for the court to strike down legislation. The country's new leadership has also refused to allow three judges - chosen legally by the previous centrist government - to join the court.

Brussels is also worried about a new media law that increases the control of the government over state broadcasters.

Mutual dissatisfaction

Several German officials have questioned the direction of Szydlo's government, prompting a backlash from Polish officials that, at times, made references to Germany's Nazi-era crimes.

The German government on Wednesday dismissed a complaint from Poland over a Carnival celebration float that poked at the Polish government. The display featured PiS leader Jaroslaw Kaczynski dressed as a dictator with his heel of his boot on the head of a bleeding female figure representing Poland.

Polish Foreign minister Witold Waszczykowski said on Tuesday that the float in the western city of Düsseldorf showed "disrespect toward Poles and Polish politicians."

"We have freedom of expression and freedom of art in Germany," government spokesman Steffen Seibert told reporters in Berlin, after he was asked about Waszczykowski's comments.

rc/jm (Reuters, dpa)