The warnings from the North Atlantic Treaty Organization and the White House over the past week could not have been graver in tone: The Russian Army, they said, had massed enough forces on the border with Ukraine to invade.

The last time Russian troops appeared to menace Ukraine, in the spring, the Ukrainian military quickly halted attacks on pro-Russian separatists to avoid the chance of touching off a new war in Europe. Not this time.

Buoyed by successes against the separatists over the past two months — and noting that the Russians have threatened an invasion in the region before without following through — Ukrainian commanders have pressed ahead with an offensive to drive the rebels from their stronghold in Donetsk in the east.

The army continued to fire artillery into the city nightly, and paramilitary groups raided outlying villages despite warnings from President Vladimir V. Putin of Russia that he could intervene at any time to protect Ukrainians who favor closer ties with his country. And the Ukrainians have flaunted their victories.

When pro-Ukrainian militiamen reclaimed the village of Marinka from pro-Russian forces, they captured the action with a GoPro camera mounted on a fighter’s shoulder. The video showed them marching into the village, yelling and waving their rifles in the air, firing wildly.

Despite growing jitters in the West, Ukraine’s military leaders say they are making a well-calculated gamble, betting that Mr. Putin feels he has too much to lose to invade, including the possibility of crippling international sanctions. So while Western officials view each new Ukrainian artillery barrage in Donetsk as drawing the country closer to the brink, the Ukrainians see their unchecked advance as further confirmation that Mr. Putin is mobilizing troops only as a scare tactic to keep them from reclaiming territory.

The government in Kiev is “calling Putin’s bluff,” said Oleh Voloshyn, a former Ukrainian diplomat, who said political leaders dismissed Mr. Putin’s moves as “psychological pressure.”

“If we pause, it would show Putin that any time he puts troops on the border, we will stop,” Mr. Voloshyn said.

Ukraine was given just that option on Saturday when a separatist leader, Aleksandr Zakharchenko, offered what appeared to be an unconditional cease-fire to prevent a large-scale “humanitarian catastrophe.” On Saturday night, a senior adviser to Ukraine’s minister of the interior said Ukraine would not halt its offensive.

As Ukraine continued its all-out assault, the international maneuvering over Ukraine’s fate continued.

Sergei Lavrov, Russia’s foreign minister, spoke by telephone with Secretary of State John Kerry and called for “urgent measures to prevent an impending humanitarian catastrophe.” The statement seemed to increase worries in the West that Russia might use the Ukrainian offensive as a convenient reason to send in troops — which it says are on exercises near the border — as a peacekeeping mission or to deliver humanitarian aid to areas under siege. Mr. Kerry cautioned Russia against intervening on the “pretext” of providing aid.

Statements issued by the White House said that President Obama had spoken with both Prime Minister David Cameron of Britain and Chancellor Angela Merkel of Germany and that all had agreed that any Russian intervention, “even under purported ‘humanitarian’ auspices,” without Ukrainian government agreement would violate international law.

Russia’s testiness over Ukraine’s boasts of increasing successes was clear on Saturday. A senior aide to President Petro O. Poroshenko of Ukraine said that diplomatic consultations overnight Friday with unspecified foreign officials had halted a Russian military column approaching the border.

A spokeswoman for the Russian Foreign Ministry, Maria Zakharova, shot back, saying “Kiev is more and more inventive in creating fairy tales,” according to Reuters.

If the Ukrainians’ calculations about Mr. Putin’s willingness to engage directly are wrong, Mr. Obama and other Western leaders will face yet another crisis at a time of mounting danger in Iraq and as hostilities between Israel and Hamas continue.

So far, despite growing anxiety, the West seems loath to try to stop the Ukrainians, particularly after the downing of Malaysia Airlines Flight 17, for which the United States blames the separatists.

There are plenty of reasons for Mr. Putin to be wary about committing troops to a war.

The separatist zones of eastern Ukraine that were well defined just several months ago are now amorphous, with the front lines shifting after the Ukrainian military retook 75 percent of the territory initially seized by pro-Russian rebels.

Beyond that, loyalties in eastern Ukraine are split, increasing the risk that the portion of the population that supports Kiev would aid any insurgency against Russia should it invade. An invasion would also be costly, not only because of the likelihood of stiffened sanctions, but because it could plunge the region into an economic free-fall, bleeding funds from whichever country wins on the battlefield.

But Western leaders and analysts remain unconvinced Mr. Putin will be willing to be taunted endlessly or to permit extensive deaths of pro-Russian civilians. The United Nations said recently that at least 1,543 civilians and combatants on both sides have died since mid-April.

“The Russian president has a record of brash, emotional and forceful behavior, and he could just ‘go for it,’ ” Cliff Kupchan, a senior analyst with the Eurasia Group, a risk analysis organization, wrote last week in an analysis published by the group. The Eurasia Group estimated the likelihood of a Russian invasion at about 35 percent.

Some of the only backers of the notion that Mr. Putin will surely not invade appear to be the pro-Russian separatists in Ukraine who crave his help. Yuri, a commander of about 500 pro-Russian fighters defending Donetsk, said he does not believe the Russians will cross the border.

“Russia,” he said, “is afraid of starting World War III.”

For the moment, it is clear the Ukrainians are emboldened.

A spokesman for the Ukrainian military operation in the east, Col. Aleksei Dmitrashkivsky, said morale is high. “The threats to send Russian peacekeepers into Ukraine have been around since April, but nothing happens,” he said. “The Ukrainian Army is learning quickly how to fight. Volunteers who join the army want to defend this land. We are not afraid.”

The Ukrainian military strategy, commanders say, centers on encircling Donetsk to squeeze off the lifeline of supplies from the other separatist stronghold, the city of Luhansk, and from the Russian border. On Saturday, a rebel website, citing the separatist military commander Igor Strelkov, said the Ukrainian Army had cut off resupply routes.

The fighting for Donetsk has taken on a lethal pattern: The regular army bombards separatist positions from afar, followed by chaotic, violent assaults by some of the half-dozen or so paramilitary groups surrounding Donetsk who are willing to plunge into urban combat.

Officials in Kiev say the militias and the army coordinate their actions, but the militias, which count about 7,000 fighters, are angry and, at times, uncontrollable. One known as Azov, which took over the village of Marinka, flies a neo-Nazi symbol resembling a Swastika as its flag.

In pressing their advance, the fighters took their orders from a local army commander, rather than from Kiev. In the video of the attack, no restraint was evident. Gesturing toward a suspected pro-Russian position, one soldier screamed, “The bastards are right there!” Then he opened fire.