In February 2023, President Biden made a surprise visit to Kyiv and declared that the U.S. and its allies were determined to win the test of wills with Moscow to defend Ukraine.

Biden had taken office pledging to rally the world’s democracies against authoritarian states. And the journey to the wartime capital was intended to underscore that bedrock policy along with the imperative of preserving Ukraine’s independence in the face of Russian President Vladimir Putin ’s invasion.

“Putin thought Ukraine was weak and the West was divided…. He thought he could outlast us,” said Biden, who donned a striped tie with Ukraine’s blue and yellow colors. “But he’s just been plain wrong.”

A year later, Moscow’s forces were raising the Russian tricolor over the town of Avdiivka, Ukrainian forces were on their back foot, and worries were proliferating through European capitals that political paralysis in Washington could compel the U.S. to step back from its leadership role.

The American-led effort to support Ukraine against its larger adversary has faced an array of obstacles, including the formidable task of revamping the West’s defense industrial base and Putin’s willingness to accept enormous losses—about 350,000 killed or wounded, according to Britain’s Defense Ministry—in pursuit of his objectives.

But the principal challenge has come at home, where additional U.S. military assistance to Ukraine has been stymied by Donald Trump -aligned House Republicans who question the importance of Ukraine for American security and in some cases even the centrality of the North Atlantic Treaty Organization alliance itself.

Ukraine’s military prospects will be a major topic in July, when NATO holds a summit in Washington to commemorate its 75th anniversary. If U.S. military aid is flowing by then, according to military analysts, Ukraine can spend this year buttressing its air and ground defenses, training fresh troops, softening up its foe with long-range strikes and preparing to go on the offensive in 2025.

But if the U.S. doesn’t resume its military support and Putin’s forces are making further gains, the celebratory NATO meeting might be transformed into a sobering split-screen moment that spurs anxieties about whether Washington can meet its commitments in the years ahead in Europe and other military theaters such as Asia and the Middle East.

“There’ll be a lot of brave talk, but the subtext will be that we can’t rely on the Americans anymore,” said Alexander Vershbow, who served as the U.S. ambassador to NATO and to Russia.

U.S. officials weren’t anticipating a confrontation with Moscow during the early months of Biden’s presidency. With the focus on China and problems at home, the goal was to keep relations with Moscow on an even keel as Biden worked to strengthen the worldwide system of alliances with the U.S. at the helm.

After taking office, Biden canceled the plans under his predecessor to remove 9,500 troops from Germany because of its low level of military spending and came to a quick agreement over cost sharing with South Korea.

A surface-to-surface missile is fired into the sea off the east coast in this handout picture provided by the Defense Ministry, South Korea, October 5, 2022. South Korean Defense Ministry/Handout via REUTERS

“America’s allies are our greatest asset,” Biden said in his first major address on foreign policy.

After the U.S. received fresh intelligence by October 2021 that Putin was planning to attack Ukraine early the following year, Ukraine emerged as the purest test of Biden’s alliance policies .

By late December 2021, Biden had authorized a fresh package of security assistance for Kyiv that would grow to more than $44 billion since Putin’s invasion.

At a NATO summit in July 2023 in Lithuania, Biden vowed that the U.S. military support would continue “for as long as it takes.”

But with House Republicans digging in their heels on additional Ukraine assistance, Biden used a different phrase to describe the American commitment when Ukrainian President Volodymyr Zelensky visited the White House five months later. The U.S., Biden said, would supply Ukraine with vital military aid “as long as we can.”

Looking back, some security analysts say that Biden should have moved more quickly to supply critical weapons systems to Kyiv , before the Russian military had time to adapt and to ensure that the arms were in Ukraine’s hands before the patience of U.S. lawmakers began to run thin.

A modest number of ATACMS surface to surface missiles , for example, weren’t provided to Ukraine until October 2023, well after the Ukrainian counteroffensive began to falter. And the weapons U.S. sent were the shorter-range variant, which has a range of about 100 miles, and not the longer-range model that has the capability to strike targets more than 180 miles away, including in Crimea.

“This was a policy that was carried out in a very incremental way due to escalatory concerns and concerns about Ukrainians’ not being able to use the kit,” said Alina Polyakova, president and chief executive officer of the Center for European Policy Analysis, a Washington-based think tank that supports Ukraine. “If we had moved faster and weren’t as worried about Russian reaction, I think this conflict could have ended in the first year before the Russians adapted.”

A senior Biden administration official said that, in making weapons decisions, the White House needed to take into account the Ukrainian military’s ability to absorb new equipment as well as Putin’s proclivity for rattling the nuclear saber.

“Ukraine wasn’t ready to receive all of this stuff on day one of this conflict,” said the administration official.

On Thursday, the National Security Council spokesman, John Kirby, said the option to provide the longer-range version of the ATACMS remains on the table. The Pentagon still has the authority to provide up to $4.2 billion in weapons and military equipment to Ukraine from its own stocks, but said this past week that it won’t do so unless Congress approves funding to replenish the Defense Department inventory.

The broader question is whether the resistance of some House Republicans to continued military support for Ukraine and the popular support for Trump’s America First policy reflect a seismic shift away from the alliance policies in Europe that Biden has long embraced.

“The point isn’t we want to abandon Europe,” Sen. J.D. Vance (R., Ohio), a staunch Trump supporter, told a security conference in Munich earlier this month. “The point is we need to focus as a country on East Asia, and we need our European allies to step up in Europe.”

Some European equipment has been crucial for Ukraine’s military effort, including Britain’s Storm Shadow cruise missile and Germany’s Iris T missile-defense system. There are more German tanks in Ukraine than U.S. ones, and European self-propelled howitzers have been important for the battle.

But the continent, which is still struggling to overcome weaknesses in its defense industrial base, wouldn’t be able to cover the shortfall if the U.S. supply of artillery shells, air defense interceptors and other key weapon systems isn’t quickly resumed, a deficiency Western analysts say Russia would move to exploit.

“Putin’s calculation is that we won’t be able to get our act together quickly enough,” said Fiona Hill , the former top Russian expert on Trump’s National Security Council. “A focal point of the propaganda right now is that Ukraine seems to be a losing proposition.”

John Bolton , who served as national security adviser under Trump, said the growing Republican opposition to support for Ukraine is largely a function of politics and isn’t a fundamental shift about the U.S. global role.

“A lot of Republicans also ask what’s the strategy for the money we’re spending,” he said. “And it’s all happening under a Democratic president, so they see it as a Democratic war.”

An essential aspect for many Republicans skeptical of aid to Ukraine, he said, is their political loyalty to the presumptive Republican presidential nominee. Trump has long been viewed as much more sympathetic to Putin than to Ukraine’s leaders.

“If Tom Cotton were the nominee and became president, the House Republicans would fall back into line,” Bolton said, referring to the hard-line Republican senator from Arkansas, who has long been a staunch supporter of Ukraine.

Liana Fix, an expert on European security policy at the Council on Foreign Relations, said the stakes in the continuing debate in Congress and in the U.S. presidential election go well beyond Ukraine.

“There’s still an idea in Europe that Trump represents the exception to decades of trans-Atlantic policy,” she said. “But if Trump wins, the realization will kick in that the Biden term was the exception. And Europe will need to adjust to a new direction in American foreign policy in which the U.S. isn’t really the leader of an alliance with Europe.”

U.S. President Donald Trump and Russian President Vladimir Putin shake hands as they hold a joint news conference after their meeting in Helsinki, Finland, July 16, 2018. REUTERS/Leonhard Foeger

-Alistair MacDonald contributed to this article.

Write to Michael R. Gordon at michael.gordon@wsj.com