By Aukkarapon Niyomyat

BANGKOK (Reuters) - A Thai military court ordered the release on bail on Tuesday of seven activists detained for campaigning against a military-backed draft constitution to be put to a referendum next month.

The pro-democracy campaigners are part of a small but growing number of activists who are challenging the junta in the run-up to the Aug. 7 vote on a constitution that the military says will end more than a decade of political crisis.

The seven were arrested in June while they were handing out leaflets urging people to vote against the charter which critics say will entrench the military's influence over politics.

"Police have completed their interrogation, so there is no need to keep the suspects in custody further," a judge told a court in the capital, Bangkok.

The seven will be released on Wednesday.

With a month to go before the referendum the junta has taken what rights groups say is a tough stance on opposition to its plans and banned all public discussion of the constitution.

The seven activists were charged with breaching a government order against public gatherings and a law that carries a 10 year jail term for campaigning in connection with the referendum.

The military seized power in a coup two years ago, saying it had to end months of street protests that had paralyzed the government and hobbled the economy.

"Vote No is a right," Rangsiman Rome, one of the jailed activists, shouted to reporters as he was led out of a prison van upon arrival at the military court.

Rangsiman and the six other activists arrived at the court shackled, a Reuters reporter said, as their supporters gathered outside holding placards.

One read: "End repression. Allow expression". Another read: "Human, right?".

In a rare show of unity, political parties on both sides of Thailand's divide have said the constitution is undemocratic.

Human Rights Watch said in a June letter to Prime Minister Prayuth Chan-ocha the junta had suppressed views critical of its policies by using trials in military tribunals, which have replaced civilian courts for some offences.

The United States, the European Union and the United Nations have raised concern about the situation in Thailand after more than a decade of turmoil sparked by confrontation between populist politicians and the military-dominated royalist establishment.

The military has promised to hold an election in 2017, even if the charter is rejected in the referendum.

(Additional reporting by Chaiwat Subprasom, Panarat Thepgumpanat, Patpicha Tanakasempipat and Sadanan Komonvisut; Writing by Amy Sawitta Lefevre; Editing by Robert Birsel)