On a remote pass through Himalayan peaks, China and India, two nuclear-armed nations, have come near the brink of conflict over an unpaved road. It is one of the worst border disputes between the regional rivals in more than 30 years.

The road stands on territory at the point where China, India and Bhutan meet. The standoff began last month when Bhutan, a close ally of India, discovered Chinese workers trying to extend the road. India responded by sending troops and equipment to halt the construction. China, the more powerful of the two, angrily denounced the move and demanded that India pull back.

Now soldiers from the two powers are squaring off, separated by only a few hundred feet.

The conflict shows no sign of abating, and it reflects the swelling ambition — and nationalism — of both countries. Each is governed by a muscular leader eager to bolster his domestic standing while asserting his country’s place on the world stage as the United States recedes from a leading role.

Jeff M. Smith, a scholar at the American Foreign Policy Council who studies Indian-Chinese relations, said a negotiated settlement was the likeliest outcome. But asked whether he thought the standoff could spiral into war, he said, “Yes I do — and I don’t say that lightly.”