PARIS (Reuters) - France's decision to extend a state of emergency for six months undermines human rights and the rule of law, Human Rights Watch said on Friday, joining the country's top magistrate union in criticizing the legislation.

French lawmakers approved a six-month extension of emergency rule on Wednesday after last week's truck attack on holiday crowds in the Riviera city. It was the third deadly assault in just 18 months for which Islamist militants have claimed responsibility.

The extension of exceptional search-and-arrest powers for police has met little resistance among French politicians. It was approved by 489 votes to 26 in the lower house of parliament and only 26 senators voted against it in a separate vote.

"A rolling state of emergency risks trampling rights and eroding the rule of law and sets a dangerous precedent for abuse elsewhere," said Letta Tayler, a researcher at Human Rights Watch said in a statement.

France's decision to extend emergency rule -- first brought in after the Nov. 13 attacks in Paris that killed 130 people -- came just before Turkey, another NATO member, declared its own state of emergency after a failed military coup.

In France, the emergency regime allows police to search homes and arrest people without prior consent from judges. It also allows them to tap computer and phone communications more freely.

The human rights group said the new emergency law also introduced what it called troubling counter-terrorism measures into France's criminal code. Those will remain in effect even after the emergency law lapses.

That included the doubling to two years of the period during which children as young as 16 can be detained before trial, it said.

France's biggest magistrate union also called on President Francois Hollande to send the new law to the top constitutional court for review and criticized lawmakers' rushed decision.

"After eight months under a state of emergency, each extension should be fiercely discussed and subjected to more intense democratic debate. Lawmakers do the exact opposite," the union said in a statement.

Just hours before the attack in Nice, Hollande had said it would make no sense to extend the emergency regime indefinitely. "That would mean we're no longer a republic," he said in a Bastille Day interview.

(Reporting by Michel Rose, editing by Larry King)