Student activists are detained during a silent protest after Thailand's election commission filed charges against a group for posting "foul and strong" comments online criticising a military-backed draft constitution, in Bangkok, Thailand April 27, 2016. REUTERS/Jorge Silva

By Amy Sawitta Lefevre and Panarat Thepgumpanat

BANGKOK (Reuters) - Thailand's election commission on Wednesday filed charges against a group for posting "foul and strong" comments online criticizing a military-backed draft constitution, the first case filed under a law that prohibits campaigning on the charter.

Groups on both sides of Thailand's political divide have denounced the draft constitution as undemocratic.

The U.N. human rights chief last week urged the junta to curtail "dangerously sweeping" powers enshrined in the draft charter and urged the government to "actively encourage, rather than discourage" dialogue on the draft.

Election commissioner Somchai Srisuthiyakorn filed the charges against members of a Facebook group based in Thailand's northeastern province of Khon Kaen.

"They posted comments on Facebook using foul and strong language," Somchai told reporters after filing the charges. He did not disclose the group's identity.

"We want them to be an example," he said. "From now on, people should talk about the constitution using reason."

Thailand's king on Friday approved a law providing a 10-year jail term for those who campaign ahead of an Aug. 7 referendum on the constitution. The law criminalizes "forcing or influencing" a voter to cast or not cast a vote.

The Aug. 7 referendum will be the first time Thais have headed to the polls since the military took power in a May 2014 coup.

Opponents of the military regime, including the Puea Thai Party, have told supporters to vote against the draft charter.

Sunai Phasuk, senior researcher in Thailand for Human Rights Watch, told Reuters a "climate of fear" was growing ahead of the referendum.

"The junta is mobilizing state machinery and everything is being used to promote the draft constitution while people who oppose the draft are being targeted," said Sunai.

In a separate case, ten people, eight from Bangkok and two from Khon Kaen, were detained on Wednesday, suspected of violating the computer crimes law, junta spokesman Winthai Suvaree told Reuters.

"We have no details on what they posted as yet," he said.

A few dozen people gathered for a silent protest against the detentions at a monument in central Bangkok. At least 15 were also detained, a Reuters witness said.

The junta has banned political gatherings of more than five people.

(Additional reporting by Patpicha Tanakasempipat and Jorge Silva; Writing by Amy Sawitta Lefevre; Editing by Nick Macfie)