Gjorge Ivanov, President of Macedonia, addresses the 69th United Nations General Assembly at the U.N. headquarters in New York September 26, 2014. REUTERS/Lucas Jackson

SKOPJE (Reuters) - The Macedonian parliament on Tuesday rejected a motion to impeach President Gjorge Ivanov over his decision to pardon 56 officials involved in a wiretap scandal that triggered a year-long political crisis.

The biggest opposition party, the Social Democrats, filed the motion after Ivanov pardoned officials who had been investigated over wiretaps alleging ex-prime minister Nikola Gruevski and his close allies authorized eavesdropping on more than 20,000 people.

Ivanov’s decision drew nationwide protests that led to the cancellation of an election set for June 5. But two weeks ago Ivanov bowed to pressure from European Union and U.S. officials and revoked the pardons.

On Tuesday, the Social Democrats failed to secure a two-third majority in favor of impeachment in the 123-seat parliament. With only 35 votes in favor and 47 against, parliament rejected the initiative.

Stefan Bogojev of the Social Democrats said Ivanov “does not deserve to be called the president”.

In an EU-brokered deal last year, Macedonia’s political parties agreed to hold an early election and that a special prosecutor should investigate allegations emerging from wiretaps released by the opposition parties.

Both the ruling VMRO-DPMNE party and the Social Democrats agree that new elections would be a way out of the crisis. But the Social Democrats say free and fair elections are not possible unless voter lists are updated and media freedom is guaranteed.