US President Donald Trump has held talks with German Chancellor Angela Merkel on the sidelines of a NATO summit in Brussels, hours after he fiercely criticised German policy on defence spending and gas imports from Russia.

The tone of their remarks when they jointly addressed reporters afterwards appeared business like, after Mr Trump had said Germany's reliance on Russian energy left it "in the control" of Moscow.

Mrs Merkel responded, saying that Germany makes "independent decisions", and referred to her youth in Soviet-run East Germany to insist Berlin was now fully sovereign.

"We're having a great meeting. We're discussing military expenditure ... talking about trade," President Trump told reporters who were allowed in to the meeting room.

"We have a very, very good relationship with the chancellor. We have a tremendous relationship with Germany," he added, saying he had raised his concerns about a new gas pipeline planned from Russia to Germany.

Mrs Merkel said she had discussed migration and trade with President Trump and looked forward to further exchanges as the United States remained a partner of Germany.

Earlier, at the start of the NATO summit, President Trump said that Germany's "inappropriate" gas deal with Moscow made it a "captive" of Russia.

He appeared to catch NATO chief Jens Stoltenberg unaware as he abandoned the polite formality of a breakfast meeting and lashed out at Berlin and other allies for failing to pay their way.

"Germany is captive of Russia because it is getting so much of its energy from Russia," Mr Trump said.

"They pay billions of dollars to Russia and we have to defend them against Russia."

German Defence Minister Ursula von der Leyen dismissed the president's claim.

"We have a lot of issues with Russia without any doubt," she told a side event at the summit.

"On the other hand, you should keep the communication line between countries or alliances and opponents without any question," she said when asked about about Mr Trump's accusation.

NATO members disagree on many issues, including a new Russian gas pipeline to Germany, but the alliance is stronger together and will deliver on boosting defence spending, Mr Stoltenberg said.

Mr Stoltenberg said it was not up to NATO to decide on the pipeline and that it was a national decision.

He also said while Mr Trump had very direct language on defence spending, the allies all agreed on burden sharing and 2017 saw the biggest increase in defence spending in a generation. 

"Despite disagreements, I expect that we will agree on the fundamentals that we are stronger together than apart."

President Trump said his efforts had pushed other NATO countries to contribute more to the Western defence alliance, but it was still not enough to offset the burden on US taxpayers.

"Over the last year, about $40 billion more has been given by other countries to help NATO but that's not nearly enough," Mr Trump told reporters ahead of the summit.

"The United States is spending far too much and other countries are not paying enough, especially some.

"This has been going on for decades and it is disproportionate and not fair to the taxpayers of the United States and we're going to make it fair. I want to compliment the secretary general, he's worked very hard on this problem."

The Speaker of the House of Representatives, Paul Ryan, has said that while NATO is indispensable Mr Trump was right to point out that US allies need to stick to their commitment to increase defence spending. 

Mr Trump was barely in Belgian airspace when he issued yet another combative tweet, attacking the European Union.

Earlier, European Council President Donald Tusk had asked Mr Trump to stop berating NATO allies over military spending.

"NATO is indispensable. It’s as important today as it ever has been," he told reporters.

Speaking in Brussels, Mr Tusk said "Dear America, appreciate your allies, after all you don't have that many. The message doesn't seem to have got through."

The summit follows an acrimonious G7 meeting in Canada, and comes amid a deepening rift between Europe and the Trump administration over a range of issues, from the Iran nuclear deal, to Mr Trump's protectionist trade policy, to the Middle East and climate change.

The most divisive issue at the NATO summit will be defence spending. Mr Trump has written to individual European leaders berating them for not spending more on defence.

NATO countries have committed to spending 2% of GDP on defence by 2024, but only a handful of countries will reach that target.

Some NATO members point out that only 15% of America's defence spending goes on defending Europe, and that the emphasis should be on adapting NATO for new threats, not simply spending more money on defence.

But those remarks are likely to fall on deaf ears.

Additional Reporting Tony Connelly