ANKARA (Reuters) - A Turkish court rejected an appeal on Monday by the pro-Kurdish opposition for the release of their jailed former leader and presidential candidate, the party said, a month before snap parliamentary and presidential elections.

Selahattin Demirtas, who has been in jail for a year and a half on security charges and faces a jail sentence of up to 142 years if convicted, was nominated by his Peoples’ Democratic Party (HDP) as a presidential candidate earlier this month.

Last week, the HDP applied for Demirtas to be released before next month’s snap election, saying his detention jeopardized voter freedom.

Turkey’s High Electoral Board has approved his candidacy and Demirtas is running his presidential campaign from behind bars.

“We condemn this lawless decision which prevents an equal and fair election. Every day that Demirtas, the candidate of millions, is not with his voters will cast a shadow on the June 24 elections and put into question its legitimacy,” the HDP said on Twitter.

A former human rights lawyer, Demirtas is one of Turkey’s best-known politicians, winning votes beyond his core Kurdish constituency in 2015 elections. Prosecutors charge that he and hundreds of other detained HDP members are tied to the militant Kurdistan Workers Party (PKK). The HDP denies the charge.

The HDP commands only about 10 to 12 percent support, but Demirtas is still likely to draw significant backing in a first- round presidential vote against President Tayyip Erdogan and other candidates, while also boosting the prospects of his party entering parliament.

Erdogan last month called snap parliamentary and presidential elections for June 24, more than a year early, to switch to a powerful executive presidency narrowly approved in a referendum last year and championed by the president.

On Monday, parties entering parliamentary elections submitted their lists of potential lawmakers. Under the new system, ministers cannot be lawmakers, meaning names on the lists will only enter a cabinet if they resign their parliamentary posts.

While Erdogan’s ruling AK Party has nominated almost all incumbent ministers as lawmakers, Turkey’s top economy team, including Deputy Prime Minister Mehmet Simsek, Finance Minister Naci Agbal and Economy Minister Nihat Zeybekci, have been left off the list.

The HDP nominated Ahmet Sik, a prominent journalist and author who was sentenced to 7 1/2 years in prison over terrorism charges last month, and Baris Atay, an actor and outspoken critic of Erdogan’s policies.