A woman stands near prayer wheels at an eighth-century temple in Paro, Bhutan. (Annie Gowen/The Washington Post)

During the long weeks soldiers from two of the world’s largest armies camped on their doorstep, officials in the tiny Buddhist kingdom of Bhutan maintained a meditative silence.

Government leaders resolutely declined to comment, and even the Bhutanese media largely refrained from covering the standoff, which began in mid-June when Indian troops crossed into a remote plateau claimed by Bhutan and confronted Chinese soldiers preparing to build a road there.

When the respective armies began withdrawing from the Doklam area Monday, the Himalayan nation of just under 800,000 finally exhaled, and analysts said that its temperance had helped defuse tension between the two nuclear-armed powers.

For years, Bhutan — a landlocked nation squeezed between the Tibet plateau to its north and India to its east, south and west — has trod a delicate balancing act between China and its great patron, India, which trains its soldiers, buys its hydroelectric power and gives it $578 million a year in aid.

In the country’s capital of Thimphu, India’s influence can be seen everywhere — from the army officers jogging on its streets to the laborers on Indian projects to build mountain roads.

“Bhutan is really caught between two sides, and the confrontation at Doklam has brought everything to the surface,” said Nirupama Menon Rao, India’s former foreign secretary and ambassador to China. “Bhutan has played this game of survival for a long, long time. Nobody does it better than them.”

But the dispute caused many in Bhutan to call for the country to reevaluate its close — some say suffocating — relationship with its southern neighbor.

“If India’s border closed tomorrow, we would run out of rice and a lot of other essentials in a few days. That is how vulnerable we are,” said Needrup Zangpo, the executive director of the Journalist Association of Bhutan. “Many Bhutanese resent this.”

The country — with stunning mountain passes, rippling Buddhist prayer flags and ancient temples — was until recently a monarchy, its villages isolated from much of the world for most of the past century. Television arrived in 1999, and even now, only about 60,000 tourists from outside the region visit each year, paying a hefty $250-a-day visa fee during the high season.

The tiny Himalayan nation of Bhutan was thrust into an international showdown as militaries from China and India were locked in a two-month standoff on a remote plateau in territory claimed by both Bhutan and China. (Annie Gowen/The Washington Post)

Its beloved and progressive fourth king, Jigme Singye Wangchuck, set the country on the path to democracy in 2008 during his rule and popularized the “gross national happiness” indicator, which rates quality of life, preservation of culture and environmental protection over economic output. In a 2015 study, more than 90 percent of residents said they experienced some level of happiness.

Bhutan’s long ties with India, by far its largest trading partner, were cemented in 1958, when India’s first prime minister, Jawaharlal Nehru, traveled through the mountains on a yak. The two countries already had agreed, in a 1949 treaty, that India would guide its foreign policy; the terms were softened and modified in 2007.

Bhutan has an ongoing border dispute and no official diplomatic ties with China, and India has frowned upon any change in this status quo. India cut off a cooking gas subsidy in 2013 because, some analysts said, it feared Bhutan’s then-government was growing closer to its northern neighbor. India has long seen Bhutan as an important ally against Chinese expansionism in the region.

A man spins a prayer wheel at the Memorial Stupa in Thimphu. (Annie Gowen/The Washington Post)

Thimphu is a still-quiet valley town, dotted with traditionally painted homes and apartments, that has modernized rapidly in the past 10 years and recently began having traffic jams.

Many of its younger, educated residents — who followed the China-India conflict on their mobile phones, via social media — said that the weeks-long standoff had raised questions about Bhutan’s place in the world and whether the country was being well served by maintaining such a close relationship with India while holding China at arm’s length.

Many of the tenants of Thimphu TechPark, a government-owned business park that opened in 2011 as a symbol of the country’s aspirations, took a pragmatic view of China — saying they see it as a potential marketplace for fledgling Bhutanese entrepreneurs. Bhutan has long looked inward, they said, and now needs to start looking outward.

“I think because we are in a global community now, we should have good relations with both China and India,” said Jigme Tenzin, the young chief executive of Housing.bt, an online real estate portal. Unlike some of his peers, he cheerfully wears his gho, the robe-like garment that is the country’s national dress, including to international conferences, saying it helps set him apart from other Asian entrepreneurs.

When the TechPark opened, it initially did not do well. But today, it has more than 700 Bhutanese employees, offices for several foreign companies and an incubation center for start-ups. One of the companies is trying to create a children’s cartoon in Bhutan’s national language, Dzongkha, to compete with the Hindi cartoons broadcast from India.

Launching a real estate start-up in a country where only about 37 percent of people are on the Internet has been a challenge, he says, as the needs of millennial apartment seekers do not always match up with the offerings of older property owners, most of whom are not online. He and his small band of employees ended up going door to door with brochures, trying to educate people.

“We’re in the middle of one foot in the future and one foot in the past,” he said with a laugh. “This transition is killing me.”

Three young boys pose for a photo at an eighth-century Buddhist temple in Paro, Bhutan. (Annie Gowen/The Washington Post)