German Foreign Minister Heiko Maas arrives for a meeting in Vienna, Austria July 6, 2018. REUTERS/Leonhard Foeger/File Photo

BERLIN (Reuters) - Germany’s foreign minister rejected suggestions that Berlin could be browbeaten by U.S. President Donald Trump into hiking military spending, saying that his country would make its own “sovereign” decisions.

Trump caused uproar at this week’s summit of the NATO alliance in Brussels by accusing Europeans of free-riding on U.S. security spending and saying Germany was a “captive” of Russia because of the two countries’ close energy ties.

German voters and its political class are deeply divided over military spending, with fears about regional insecurity and an assertive Russia jostling with a traditional post-World War Two reluctance to flex its muscles militarily.

“We aren’t captives of Russia or the U.S.,” Foreign Minister Heiko Maas told weekly magazine Der Spiegel. “We take free, sovereign decisions about our budget, our energy supplies and our trade relationships, on the basis of facts.”

All NATO countries, including Germany, are committed to raising their military spending to 2 percent of GDP by 2024, a target Trump wants them to meet by next year.

While Chancellor Angela Merkel and much of her conservative bloc are sympathetic to the goal of raising military spending, her Social Democrat (SPD) coalition partners are more divided.

Martin Schulz, a former SPD leader, went further than his party colleague Maas, telling Spiegel: “With his deliberate dividing of the western alliance and his contempt for its values, Trump is endangering world peace.”

Voters in Europe’s richest country are divided on the issue, a poll for Sueddeutsche Zeitung newspaper showed on Friday, with 45 percent wanting Germany to reach the 2 percent target and 49 percent against.