Image caption Police and supporters of the temple have been engaged in a lengthy stand-off in the outskirts of Bangkok

Over the past month what is often cited as the world's largest Buddhist temple, on the outskirts of Bangkok, has been the scene of an extraordinary stalemate.

Police officers, in rows three deep, blocked the gates to the Wat Dhammakaya temple compound. Around the back, helmeted soldiers guarded alleyways, with some crawling through surrounding rice-fields. It was, they explained, a restricted military zone. Nobody was allowed inside.

The official reason for this siege was that the elderly abbot, Phra Dhammachayo, was wanted on multiple criminal charges related to a collapsed credit union and police believed he was being hidden inside the temple.

It was the largest security operation since the 2014 coup, involving thousands of troops and police officers, trying to flush him out. At one point it seemed certain they would storm the temple. Conservative supporters of the government made no secret of their wish to see what they view as a dangerously deviant Buddhist sect shut down.

But then, after three weeks, the operation was suddenly called off.

The police, after their third search through the sprawling complex, appeared to have been convinced that the abbot was no longer there. So the temple's passionate followers, who had been confined by the police in a nearby marketplace, were finally allowed to enter. Even now it remains unclear what exactly the police wanted to achieve.

Security threat?

As so often in Thailand, the official explanation is misleading. Allegations of financial malpractice have hung over the temple and its charismatic abbot for decades. They also hang over many other institutions and individuals in Thailand, many of whom are neither investigated nor prosecuted. To be pursued by the state with this much commitment suggests that much larger issues are at stake.

Image caption The temple is famous for its futuristic golden dome

Image copyright Getty Images Image caption It is renowned for holding visually spectacular mass events

Wat Dhammakaya is controversial. The temple compound has been constructed on a vast scale, with a huge, open-air auditorium, centred on a gold, flying-saucer-shaped chedi (stupa). Other futuristic buildings are dotted around the site - it is quite unlike any other Buddhist temple. It does not hide the fact that it is perhaps the wealthiest religious sect in Thailand.

The auditorium can, we were told, accommodate up to one million people, and Dhammakaya is famous for its impressively choreographed mass-meditations, sometimes by candlelight.

The movement is big on discipline. Its stripped-down interpretation of traditional Buddhist thinking and practices, and the intense, shared experience of meditation, has proven very appealing to its urban, middle-class followers, whose intense devotion to Phra Dhammachayo has been likened by some to a form of cult worship. The emphasis on donations has prompted accusations that it has commercialised Buddhism.

So it should come as no surprise that a military government bent on restoring traditional values, and backed by ultra-conservatives who want to see the Buddhist clergy cleansed of corrupting, modern influences, dislikes Wat Dhammakaya. A former senator, Paiboon Nititawan, who has led the calls for the temple to be taken over, goes further and argues that it is a threat to national security.

"Phra Dhammachayo is ready to ask his followers to protect him, and those tens of thousands of people could easily turn into a mob. The abbot's followers insisted the police needed their permission to enter, and that they would only comply with their orders when Thailand is democratic again. This is like declaring autonomy, and denying the sovereignty of the state."

Image copyright Reuters Image caption Police blocked access to the temple as they searched for the missing abbot

Image caption Phra Pasura Dantamano rejects suggestions that the temple and its supporters pose any kind of threat

Temple followers laugh off these accusations as absurd. Spokeperson Phra Pasura Dantamano, a former Thai Airways flight attendant who became a monk at Dhammakaya 11 years ago, said that even if the security forces stormed the temple, they would face only peaceful resistance.

"We are just a temple, we are not a threat to national security. As you can see, we are women and old people, chanting and meditating. We are not dangerous."

'Outside politics'

But the government continues to push its argument that there is something sinister about Wat Dhammakaya.

Last weekend the police showed off a large cache of weapons seized, they said, from the home of a now-exiled dissident. Although many of the weapons were ancient, the police argued that there was a plan to arm the temple's supporters and even to assassinate top government officials.

The attempt to link the temple with this dissident is telling. His name is Wuthipong "Kotee" Kochathamakun, one of the most outspoken members of the "red-shirt" movement, which backed the government unseated by the coup. He left Thailand even before the coup and has been charged in absentia with lese majeste, insulting the monarchy. He was singled out by the military in 2014 as a dangerous radical, although other red-shirt activists say his tough talk was largely posturing.

But the police statements help reinforce the government's view that Wat Dhammakaya is allied to former Prime Minister Thaksin Shinawatra, whose parties won every election held over the past 20 years and whose destruction as a political force is still thought to be the primary, though unstated, aim of the 2014 coup leaders.

Again the temple denies this charge, insisting it is above politics and pointing out that its followers come from all political factions.

More do appear to come from the red-shirt side; a number of prominent red politicians attend the meditation sessions. But academic James Taylor from Adelaide University, who has studied Wat Dhammakaya for years, believes the notion of a political alliance is now outdated.

"The movement was clearly ambitious during its early decades, contesting religious convention by attempting to reframe the religious system from within, recruiting economically and politically influential individuals... But in the past decade it has remained outside of politics in an effort to disassociate itself from any political alliances."

Image copyright Getty Images Image caption Thai authorities fear supporters of the temple could evolve into a powerful force like the red-shirt movement

There are striking parallels between the methods used by Wat Dhammakaya and Mr Thaksin's political movement to build a mass support base. Both offered a powerful sense of belonging to people feeling rootless in Thailand's increasingly urban and material society. Both were skilled at using modern media to project a simple, appealing philosophy and skilled at raising large amounts of money, an essential ingredient for any successful movement in Thailand.

Indeed the temple is the largest institution in the country not under the military's control, and its refusal to hand over its abbot is the most sustained defiance of military rule since the coup.

Triple transition

But there is another equally important factor which may have driven the government to act. Buddhism itself has been in crisis in Thailand for many years, as the modern, material world has either corrupted parts of the monkhood, or made its role seem less relevant, much as the church has lost its influence in Western societies. The popularity of Wat Dhammakaya is a symptom of that lost faith in traditional religion.

And this matters in a country lacking the reinforcing narrative of an anti-colonial struggle that has defined the identity of so many other countries in this region. Thailand's official national slogan has long been "Nation, Religion, King", although the military government has now added "People" to the slogan, and an "s" to "Religion" to acknowledge that not every Thai is Buddhist.

Image copyright Reuters Image caption The Thai monarchy and Buddhism are seem as symbiotically linked

Image copyright AFP Image caption Thailand's widely-revered King Bhumibol Adulyadej died on 13 October 2016, triggering national mourning

Just as the monarchy is seen by Thailand's rulers as the essential institution holding the country together and legitimising governments, so the monarch's official role as protector of Buddhism gives each occupant of the throne a unique, sacred stature. Kings preside over the most important Buddhist rituals at the most prestigious temples. The two institutions reinforce each other.

And that symbiotic relationship is never more important than in a time of transition, as now, after the defining, 70 year-long reign of King Bhumibol Adulyadej, and while his untested son, King Maha Vajiralongkorn, is shaping his own, very different reign, one which the harsh penalties of the lese majeste law prevent any Thailand-based journalist from writing about it freely.

Presiding over his father's elaborate cremation later this year will be an important source of legitimacy for the new king. But his relationship with the Buddhist hierarchy also matters. Already he has made his mark, restoring the monarch's right to name the Supreme Patriarch, the head of the Sangha, the body that regulates the faith, but which has lain moribund for some years.

King Vajirakongkorn's command to strip the royal monastic titles from Phra Dhammachayo and his de facto replacement as abbot also signals royal support for the government's move against the temple.

Thailand is in the midst of a complex and potentially dangerous, triple transition; a delicate royal succession, a battle over the future of Buddhism and a still uncertain political transition to a military-guided democracy.

Given that, a sect as controversial as Wat Dhammakaya was perhaps bound to be caught up in the turbulence.