Turkey's highest court has rejected a petition by opposition legislators to strike down legislation stripping scores of lawmakers of their immunity from prosecution.

Turkey's parliament last month approved amendments to the constitution that pave the way for the trials of some 138 legislators, including several pro-Kurdish lawmakers who face terror-related charges.

The amendments were proposed after President Recep Tayyip Erdogan accused the pro-Kurdish People's Democratic Party, or HDP, of being an arm of the outlawed Kurdish PKK rebel group and repeatedly called for its lawmakers' prosecution. He has yet to ratify the bill.

Pro-Kurdish and other opposition legislators petitioned the Constitutional Court for the bill's cancellation.

The state-run Anadolu Agency said the court rejected the petition after deliberations on Friday. It did not immediately provide a reason.