US President Donald Trump has welcomed German Chancellor Angela Merkel in the White House for the first face-to-face meeting between two leaders known for holding opposing views on a host of issues.

Items on the agenda for Friday's meeting included the fight against ISIL, strengthening the NATO alliance and resolving Ukraine's conflict with Russia.

At the start of her remarks in a joint press conference, Merkel said it was "much better to talk to one another and not about one another".

READ MORE: Berliners react to Trump's US-Mexico wall

Trump had repeatedly bashed Merkel during his presidential campaign last year, accusing her of "ruining" Germany for allowing an influx of refugees from Syria.

At the news conference, Merkel hinted at differences, saying: "This is obviously something we had an exchange of views about."

For his part, Trump, whose executive order temporarily suspending the US refugee programme and barring people from several Muslim-majority countries was recently struck down again by a federal court, said both countries must protect themselves from the threat of what he called "radical Islamic terrorism".

"Immigration is a privilege, not a right, and the safety of our citizens must always come first, without question," Trump said at the news conference.

OPINION: Angela Merkel is not the great progressive messiah

Al Jazeera's James Bays, reporting from Washington, DC, said the meeting represented a "chance to make things up" between the two leaders, "but it has been an awkward day".

"The relationship between these two leaders has been difficult in the past, mainly because of comments made by President Trump when he was a candidate," Bays said.

"What most people are going to take away from this are the optics. It did not look like these two leaders go on well at all."

Caption this please. pic.twitter.com/U69UYAT33r

The visit began cordially, with the pair shaking hands at the entrance of the White House.

But later, sitting side-by-side in the Oval Office, Merkel's suggestion of another handshake went unheard or ignored by Trump - an awkward moment in what are usually highly scripted occasions.

NATO, 'wiretapping'

Trump reaffirmed Washington's "strong support" for NATO but also reiterated his stance that member countries in the alliance need to "pay their fair share" for the cost of defence.

"Many nations owe vast sums of money from past years and it is very unfair to the United States. These nations must pay what they owe," said Trump, who has long complained that the US shoulders too much of the burden of the cost of the alliance.

In response, Merkel said she was encouraged that Trump backed NATO, stressed its vital role and pledged that Germany will increase its own payments.

The two leaders also discussed the situation in Afghanistan and Ukraine.

INFOGRAPHIC: Germany and USA - Face to face

Trump said he "very seldom" regrets anything he tweets, brushing off questions about his claims without evidence that his predecessor, Barack Obama, wiretapped him during last year's presidential campaign.

"At least we have something in common," Trump said, apparently referring to reports during Obama's presidency that the US had bugged Merkel's phone. Congressional leaders from both political parties say they do not believe Trump was wiretapped.

On the issue of the economy, Trump said he expected the US to do "fantastically well" in trade with Germany, while Merkel said she hoped the US and the European Union could resume discussions on a trade agreement.

Trump said he did not believe in isolationism but that trade policy should be fairer.

"We held a conversation where we were trying to address also those areas where we disagree, but we tried to bring people together ... (and) tried to find a compromise that is good for both sides," Merkel said.

The two leaders will continue their discussions over lunch on Friday with a focus on fair trade.