The son of Libya’s deposed dictator Moammar Gadhafi has been disqualified from running for president in the upcoming presidential elections next month over his previous convictions, the country’s electoral body said.

The name of Seif al-Islam Gadhafi appeared on a list of ineligible candidates issued by the country’s High National Elections Committee. He can appeal the decision in court in the coming days.

Seif al-Islam had been sentenced to death by a Tripoli court in 2015 for using violence against protesters in a 2011 uprising against his father, but that ruling has since been called into question by Libya’s rival authorities. He is also wanted by the International Criminal Court on charges of crimes against humanity related to the uprising.

Libya is set to hold the first round of presidential elections on Dec. 24, after years of U.N.-led attempts to usher in a more democratic future and end the country’s civil war. Adding to the concerns surrounding the election, the U.N.’s top envoy for Libya submitted his resignation last week, though he said Wednesday he is prepared to stay on through the vote if needed.

The son of Libya’s former dictator submitted his candidacy papers in the southern town of Sabha on Nov. 14. It was the first time in years that the 49-year-old, who earned a PhD at the London School of Economics, appeared in public.

But his candidacy was not welcomed by all.

An influential council of elders from Misrata, a city which played a key role in the 2011 uprising that toppled his father, called for an election boycott.

The council rejects “the candidacy of those who used excessive force against the Libyan people’s uprising and who are the target of arrest warrants from Libyan courts and the International Criminal Court,” it said in a statement.

It urged “free patriots” to protest against the election taking place before a constitutional basis was agreed.

A member of the electoral commission, the High National Elections Commission (HNEC), told Agence France Presse (AFP) that “residents protesting at the candidacy of Seif al-Islam Gadhafi in presidential elections closed down several polling stations” in the west.

The official, who asked not to be named, said there had been no violence and voting stations had not been damaged.

He had been captured by fighters in the town of Zintan late in 2011, as the uprising ended his father’s rule after 40 years. Seif al-Islam was released by the militia holding him in June 2017 after the Eastern-based pro putschist Gen. Khalifa Haftar parliament granted amnesty.

The announcement of his possible candidacy stirred controversy across the divided country, where a number of other high-profile candidates have also emerged in recent weeks. Among them are putschist Gen. Haftar, who is accused of war crimes, and the country’s interim prime minister Abdul Hamid Dbeibah.

The long-awaited vote still faces challenges, including unresolved issues over laws governing the elections, and occasional infighting among armed groups. Other obstacles include the deep rift that remains between the country’s east and west and the presence of thousands of foreign fighters and troops.

Meanwhile, U.N. envoy Jan Kubis submitted his resignation last week, though it didn’t become public until Tuesday.

The Geneva-based diplomat serves as both special envoy for Libya and head of the U.N. political mission in the country. He told the Security Council on Wednesday that he is leaving to facilitate a change he considers vital: moving the mission chief’s job to Tripoli to be on the ground at a high-stakes moment for Libya.

The idea divided the council during discussions in September. Western countries embraced it; Russia rejected it.

Kubis added that he was ready to continue as special envoy through the election, though he said the U.N. had accepted his resignation with a Dec. 10 effective date.

Asked about the discrepancy, U.N. spokesperson Farhan Haq said the organization would “continue to work with him while we’re seeking a successor.”

The job was open for nearly a year before being filled by Kubis, a former Slovak foreign minister and U.N. official in Iraq and Afghanistan.

The Security Council emphasized the importance of the upcoming election Wednesday, urging an “inclusive and consultative electoral process,” warning against violence and disinformation and calling for Libyans to accept the results of the vote.

Libyan Ambassador Taher El Sonni said his country appreciates “all international initiatives with genuine intentions,” but he said the council’s members need “to heed us, too” and let Libyans lead their own way out of crisis.

“You have a moral responsibility towards the developments in my country over the past 10 years,” he told the group. “Don’t belittle us.”