(Reuters) - Thailand's king endorsed an interim constitution on Tuesday that grants power to the military to intervene in politics for security reasons without approval of a civilian government, due to be elected next year. The constitution, posted online late on Tuesday, preserves the National Council for Peace and Order (NCPO), or the junta that has ruled Thailand since a coup on May 22, and grants immunity from prosecution to those who led the putsch.

The draft gave no timeframe for when a general election would take place, although junta leader General Prayuth Chan-ocha has said it would likely come at the end of next year.

The charter was whittled down from 309 articles to just 48 and allows the NCPO to intervene in matters it deems "destructive to the peace and safety of the country" even if the that meant disrupting the interim government's work.

The military's continued role in Thai politics has long been anticipated, although it was unclear whether it would remain involved in economic matters. The NCPO has been scrutinizing state-owned firms and major infrastructure deals, leading to delays in auctions and projects approved by the ousted government, and prompting concerns among investors already jittery about its policymaking clout.

The palace confirmed the endorsement of King Bhumibol Adulyadej, 86, during a routine royal news bulletin late on Tuesday. He met Prayuth at his palace in the seaside town of Hua Hin, to which he returned in August 2013 after a four-year stint in a Bangkok hospital.

CYCLE OF CONFLICT

The military said its coup was to restore order after months of at times violent unrest as protesters tried to topple former Prime Minister Yingluck Shinawatra, the sister of tycoon Thaksin Shinawatra, an ex-premier whose parties have won every election since 2001 on a groundswell of working-class support. Yingluck was forced by a court to step down on May 7 for abuse of power and the remainder of her caretaker cabinet was ousted by the army two weeks later.

The turmoil was the latest chapter in almost a decade of conflict pitting the military-allied royalist establishment and Bangkok's middle classes against the Shinawatra family, its business allies and its mostly working-class supporters.

The country has been hamstrung by an unrelenting cycle of elections, protests and judicial and military intervention, each backed by feuding families of upstart businessmen allied with Thaksin or influential scions bitterly opposed to him.

Thaksin was also ousted in a 2006 coup, and now chooses to live in exile rather than return home to serve prison time for an abuse of power conviction.

The military re-wrote the constitution back then, but Thaksin's supporters say it failed to neuter his power and fear a new one would be more drastic in trying to stifle his populist political machine. Yingluck has kept a low profile since being removed from power. Last week the junta gave her permission to travel abroad and she is thought to be heading toFrance, where Thaksin will celebrate his 65th birthday on Saturday.

(Additional reporting by Panarat Thepgumpanat; Writing by Martin Petty; Editing byJeremy Gaunt)