NATO Secretary General Jens Stoltenberg told CNBC that President Donald Trump's rhetoric on defense spending is having an "important" impact on the military alliance.

"I'm saying that his message has been very clear and that his message is having an impact on defense spending. And this is important because we need fairer burden sharing in the NATO alliance," he told CNBC's Hadley Gamble at the Munich Security Conference on Saturday.

"We see more nations spending 2 percent of GDP (gross domestic product) on defense which is the NATO guideline and we see that all nations have stopped the cuts we saw for many years to their defense budgets. And all nations have started to increase," he added.

Contributions to NATO are a highly sensitive topic. Trump has often criticized other NATO members for not respecting the spending rule. Speaking at a NATO summit in 2017, Trump said: "Over the last eight years, the United States spent more on defense than all NATO countries combined. If all NATO members had spent just 2 percent of GDP on defense last year, we would have had another $119 billion for our collective defense."

Members are obliged to spend the equivalent of 2 percent of their own gross domestic product (GDP) on national defense. These payments are used "to meet the needs of its armed forces, those of allies or of the alliance," to pay pensions to retired military, to contribute to NATO-managed trust funds as well as research and development.