Donald Trump's suggestion the US would not protect Nato allies failing to spend enough on defence "undermines all of our security", the Western military alliance's chief has said.
Jens Stoltenberg also suggested it put US and European troops at greater risk.
The Republican said he had told allies he would "encourage" Russia to attack any Nato member that failed to meet the alliance's target of 2% of their GDP.
Members of Nato commit to defend any nation in the bloc that gets attacked.
President Joe Biden called Mr Trump's comments "appalling and dangerous", suggesting his predecessor intended to give Russian President Vladimir Putin "a green light for more war and violence".
Addressing crowds during a rally in South Carolina on Saturday, Mr Trump said he had made his comments about Russia during a previous meeting of leaders of Nato countries.
The former president recalled that the leader of a "big country" had presented a hypothetical situation in which he was not meeting his financial obligations within Nato and had come under attack from Moscow.
He said the leader had asked if the US would come to his country's aid in that scenario, which prompted him to issue a rebuke.
"I said: 'You didn't pay? You're delinquent?'... 'No I would not protect you, in fact I would encourage them to do whatever they want. You gotta pay.'"
The frontrunner for the Republican nomination for this year's presidential election did not make clear which nation or leader he was speaking about, or even when this conversation took place.
According to Nato's own figures for 2023 spending, 19 of its 30 member nations are spending below the target of 2% of their annual GDP on defence - among them Germany, Norway and France.
But most countries which border Ukraine, Russia, or its neighbour and ally Belarus, are exceeding this guideline.
At over 3.9% of its annual GDP, Poland spends even more than the US. Romania, Hungary, Finland and the Baltic states of Latvia, Lithuania and Estonia range between 2.3 and 2.7% for defence expenditure.
In a statement on Sunday, Mr Stoltenberg emphasised the alliance remains "ready and able" to defend its members and any attack "will be met with a united and forceful response".
But he said any suggestion that "allies will not defend each other undermines all of our security", and suggested Mr Trump's remarks "put American and European soldiers at increased risk".
"I expect that regardless of who wins the presidential election the US will remain a strong and committed Nato ally," he added.
Following Mr Stoltenberg's comments, US President Joe Biden said: "Donald Trump's admission that he intends to give Putin a green light for more war and violence, to continue his brutal assault against a free Ukraine, and to expand his aggression to the people of Poland and the Baltic states, [is] appalling and dangerous."
Nikki Haley, Mr Trump's only remaining rival for the Republican nomination, warned against taking the side of Russia and Mr Putin - who she described as a "thug who kills his opponents" in an interview with the BBC's US partner CBS News.
Mr Trump has long been critical of Nato and what he sees as an excessive financial burden on the United States to guarantee the defence of 30 other nations.
Dr Patrick Bury, a defence and security expert and former Nato analyst, told the BBC that Mr Trump was reflecting anger in the US that some European Nato countries were not spending 2% of their budget on the military, as Nato wants.
"Playing hardball with Nato allies is correct, but it all depends on how far you go. These comments are too far, really," he said.
But he said such statements had an impact at a time when Russia had put its economy onto a war footing and its military spending was outstripping that of European countries.
"If Trump is in the White House and there was a split in Nato either over Ukraine... or about how it would respond to a small incursion that should in theory trigger article five. That's where the Nato alliance is worried are these what-ifs," he said.
Russia launched its full-scale invasion of Ukraine in 2022, after Mr Trump left office. He has since bemoaned the amount of US money sent to Ukraine, which is not a Nato member.
The US has provided Ukraine with more financial support than any other country - totalling more than $44bn (£34bn) since the 2022 invasion, according to White House figures from December.
However, Republicans in Congress have since the turn of the year blocked all new funding - demanding tough measures to restrict migration into the US on its southern border, and then refusing the amended bill when it was presented earlier this week.
Mr Trump celebrated that rejection during Saturday's rally, saying the proposals made by President Biden had been "disastrous".
The two issues have now been successfully separated, meaning that senators are now able to debate the aid money separately.