MADRID (Reuters) - The judge investigating a corruption scandal in Spain's ruling centre-right People's Party on Friday rejected legal petitions that he call on Prime Minister Mariano Rajoy to testify.

Examining Magistrate Pablo Ruz is looking into an alleged slush fund operated by former PP treasure Luis Barcenas, who has testified that he channelled millions of euros of cash donations from construction magnates into the pockets of party leaders.

Earlier this year the scandal threatened to destabilize Rajoy's government, but he and other party leaders deny any wrongdoing and so far have not become direct targets of Ruz's investigation.

The prime minister's approval rating has recovered after dipping in the early days of the scandal, as he sticks to a strategy of blaming Barcenas alone for any wrongdoing.

Lawyers for activist groups and opposition political parties had petitioned Ruz to seek testimony from Rajoy and other top members of the party to get to the bottom of the case.

But Ruz said in a judicial writ that their testimony "was not necessary to determine the meaning and reach of the facts under investigation." He did call on a former PP treasurer, the one before Barcenas, to testify.

Barcenas - who according to court documents hid up to 48 million euros in Swiss bank accounts - is in jail pending trial on charges including money laundering and tax fraud in a separate corruption case. He has also been charged with crimes in the slush fund case.

In August Rajoy made a speech in Parliament and apologised to the public for mistakenly placing his trust in Barcenas, but denied any other wrongdoing.

If Rajoy had been called to testify, it would have been behind closed doors - as is normal in pre-trial investigations in Spain - or perhaps in writing.

However, lawyers involved with the case often leak transcripts of testimony as happened when PP Secretary General Maria Dolores de Cospedal testified in August.

(Reporting by Inmaculada Sanz,; Writing by Fiona Ortiz, Editing by Angus MacSwan)