President Biden warned President Vladimir V. Putin of Russia on Tuesday that an invasion of Ukraine would result in heavy economic penalties for him and lead NATO to reposition its troops in Europe, measures that he said would go well beyond the West’s response to Russia’s annexation of Crimea seven years ago.

In a two-hour, secure video conference that American and Russian officials both described as tense but occasionally pierced by humor, Mr. Biden also said an invasion could end Russia’s hopes of completing the Nord Stream II gas pipeline to Europe, which would be a major new source of energy revenue.

It is too early to tell whether the much-anticipated conversation, whose details were hard to elicit as both the White House and the Kremlin put their spin on it, will alleviate the immediate crisis in Ukraine, where roughly 70,000 Russian troops have massed, with more equipment and personnel arriving every day.

Mr. Putin gave no indication of his ultimate intent, American officials said, leaving the world guessing whether he was actually planning an invasion early next year, or trying to get the West to pay attention to his demands by manufacturing a crisis.

In a brief video of the opening moments of the call released by Russian state television, Mr. Putin said, “Greetings, Mr. President!”

“Good to see you again,” Mr. Biden responded warmly, after what appeared to be a brief connection glitch. He lamented that they had not seen each other in person this fall at the Group of 20 summit meeting. But neither side released any video of conversation on the issues at hand.

Not surprisingly, both sides portrayed their leaders as resolute. Jake Sullivan, Mr. Biden’s national security adviser, said the president was “clear,’’ “direct” and “candid.”

The Russian government, in an unusually detailed description of the encounter, said Mr. Putin had warned Mr. Biden that Western military activity in and around Ukraine was approaching a “red line” threatening Russia’s security.

“There was no finger-wagging, but the president was crystal clear,’’ Mr. Sullivan told reporters after the session, which Mr. Biden conducted from the White House Situation Room, and Mr. Putin from his retreat on the Black Sea. Asked for specifics about the consequences facing Russia, Mr. Sullivan declined to go into detail.