France's highest court ruled on Tuesday that wiretapped conversations could be used in a corruption case against Nicolas Sarkozy, in a blow to the former president's plans to run in next year's elections. The highly-anticipated ruling comes as the 61-year-old was gearing up to launch a campaign to win back his former office in the 2017 presidential election, in a bid already dogged by several legal woes. The court ruling opens the way for investigating judges to decide whether to take the case to trial, which they will do in the coming months. Sarkozy, who was president between 2007 and 2012, became the first former head of state to be taken into custody when he was charged with corruption, influence peddling and violation of legal secrecy in July 2014. He is accused of conspiring with his lawyer to give a magistrate a lucrative job in exchange for inside information on yet another corruption probe against him. Investigators first bugged his phones over allegations that former Libyan strongman Muammar Qaddafi's regime helped finance Sarkozy's 2007 campaign. It was in these recordings that Sarkozy was heard talking about another charge against him in which he was accused of accepting illicit payments from L'Oreal heiress Liliane Bettencourt for the same campaign. He was cleared in 2013 of taking advantage of the elderly woman while she was too frail to understand what she was doing. In the recordings Sarkozy is heard discussing the possibility of giving a magistrate from a top appeals court, Gilbert Azibert, a juicy job in Monaco in return for information on the Bettencourt case. Azibert did not get the posting but has also been charged, along with Sarkozy's lawyer Thierry Herzog. The former president's legal team has attempted to suppress the recordings, saying they were a breach of lawyer-client privacy rules. After the Paris appeals court ruled in May last year that the recordings could be used as evidence, Sarkozy's legal team took the case to the Court of Cassation, France's court of last resort. A trial would strike a fresh blow to Sarkozy, who is struggling in the polls against other conservative rivals to win the presidential nomination for his party, the Republicans. In February, Sarkozy was also charged with illegal funding of his failed presidential campaign in 2012, when he lost to the current French leader Francois Hollande. Sarkozy was deeply unpopular at the time of his election defeat to Hollande, and left the political arena vowing: "you won't hear about me anymore." However, as his successor Hollande dropped in voters' esteem to become the most unpopular French leader in modern history, Sarkozy staged a comeback to front-line politics in 2014. He won the leadership of his UMP party, and renamed it the Republicans, re-branding it in order to make a fresh tilt at the presidency. However, polls put him behind other rivals as the party prepares to hold a primary in November.