The stark warning put the 28-member alliance on notice that the White House has not backed down from Trump's demands that other NATO members pay more for the military alliance that has been a keystone of global security for nearly 70 years.
"If your nations do not want to see America moderate its commitment to this alliance, each of your capitals need to show support for our common defense," Mattis told a meeting of defense ministers at North Atlantic Treaty Organization headquarters.
"No longer can the American taxpayer carry a disproportionate share of the defense of Western values," Mattis said. "Americans cannot care more for your children's future security than you do."
Mattis did not say how or how soon the United States would pull back if NATO members don't increase military spending. But he didn't suggest withdrawing from the alliance entirely or question its fundamental purpose, as Trump did in mid-January when he called NATO "obsolete."
Nor was it clear if other nations will pay heed to Mattis. Czech Defense Minister Martin Stropnicky downplayed the warning, saying fellow ministers were not concerned.
"This is not the first time we've heard this" from U.S. officials, he said after the meeting.
The Obama administration also urged NATO members to boost spending, but didn't threaten to cut support unless its demands were met. NATO took part in the U.S.-led air war in Libya in 2011, and has stepped up operations in Afghanistan and in Europe since 2014.
Indeed, ever since Russia seized Crimea and began backing armed separatists in eastern Ukraine in 2014, the Pentagon has sent reinforcements to NATO nations in Eastern Europe to reassure allies and to deter Russia from potential aggression.
Early last month, the Army sent 87 tanks, 144 armored vehicles and 3,500 troops to Poland in the biggest U.S. military deployment in Europe in decades.
The Pentagon also plans to construct or refurbish facilities, airfields and training ranges in Bulgaria, Estonia, Germany, Latvia, Lithuania, Poland and Romania.
Other NATO members also have boosted their forces in the region, including Canadian troops in Latvia, German troops in Lithuania, and British troops in Estonia.
British Defense Secretary Michael Fallon backed Mattis, urging other NATO members "to step up and share burdens on spending and help it become more agile in dealing with new threats, including cyber and terrorism."
Only five countries — the United States, Britain, Estonia, Greece and Poland — meet the NATO goal of spending at least 2% of gross domestic product on defense.
Perhaps anticipating Mattis' warning, NATO released data Tuesday that said its members had increased military spending last year by 3.8%, or $10 billion.
Total military spending by NATO governments now totals $890 million. The United States pays the largest share by far — but it has the world's largest military, and the largest defense budget, by far.
Despite a series of Pentagon budget cuts, the Obama administration spent 3.61% of U.S. gross domestic product on the military last year, according to the data. The total, about $664 billion, was more than twice as much as the other NATO governments combined.
Since taking office, Trump has vowed to "rebuild the military," promising to increase the Army and Marine Corps, and to build more Navy ships and Air Force fighter aircraft. He also wants to modernize nuclear weapons and missile defense systems.
Independent groups estimate that could cost $150 billion or more annually. The Trump administration's first budget plan is due to Congress by April.
Trump and Stoltenberg spoke by phone earlier this month, and Trump agreed to attend the annual NATO alliance in May. Trump also backed off his previous criticism, saying he had "strong support" for NATO, according to the White House.
On Wednesday, Mattis assured NATO members that Washington remains a steadfast partner, calling the alliance "a fundamental bedrock for the United States and for all the trans-Atlantic community."
A gulf of suspicion has opened between European allies and the Trump administration, which has alarmed U.S. allies by seeking warmer ties with Moscow.
Fears were further stoked by news that
On the flight to Brussels, Mattis said Flynn's ouster would have "no effect at all" on his role at the Pentagon or with the White House.
He and Pence will attend a security conference in Munich, Germany, on Thursday. Secretary of State Rex Tillerson will be making his official international debut at an economic summit in Bonn, Germany.
They all are expected to reassure allies of the U.S. commitment to Europe, and to argue that the young Trump administration is going through normal teething pains despite the constant turmoil in the White House.
"For each of our NATO allies, the relationship with the U.S. is their top national security relationship and they need positive and healthy interaction with the new administration," said Jorge Benitez, NATO expert at the Atlantic Council, a Washington-based think tank.
"But the chaos and mixed messages coming out of the Trump team makes them very uncertain about how they can develop a positive relationship with a president that is so unpredictable," he added.
1:50 p.m.: This article was updated throughout with additional details about Defense Secretary James N. Mattis' warning to NATO allies.