By Emma Pinedo and Belén Carreño
MADRID (Reuters) - Spain's Prime Minister Pedro Sanchez declined to testify on Tuesday as a witness in a judicial investigation into alleged corruption and influence peddling against his wife that led him to consider resigning in April, lawyers present at the hearing said.
The proceedings are part of a preliminary investigation into whether Begona Gomez used her position as the premier's wife to secure sponsors for a university master's degree course that she ran.
Sanchez has repeatedly denied the accusations against her, saying they were baseless and orchestrated by right-wing political foes, and on Tuesday, the state attorney's office filed a lawsuit on his behalf against the investigating judge for alleged malfeasance.
"This lawsuit is intended to respect the independence of the judiciary, but also to defend it from the practices of those who operate for political motives and outside the law," government spokesperson Pilar Alegria said.
Gomez herself has not publicly commented on the case.
Her lawyer, former Interior Minister Antonio Camacho, said Sanchez's testimony had lasted two minutes, and Judge Juan Carlos Peinado asked him two questions - whether he was related to any of the people under investigation and whether he wanted to testify.
Sanchez replied that Gomez was his wife and he did not want to testify. Under Spanish law, close relatives including spouses can refuse to answer questions when summoned by a judge.
Peinado interviewed Sanchez in the Moncloa palace government headquarters in Madrid where Sanchez has his official residence. A small group of protesters congregated outside shouting slogans against Sanchez and his Socialist Party.
Peinado was accompanied by Gomez's counsel, representatives of the prosecutor and a lawyer for far-right party VOX, which uses a legal instrument known as "the people's accusation" which lets private individuals bring criminal complaints against third parties.
In late April, Sanchez took a five-day break from his duties to weigh whether to resign after the court opened the investigation, but ultimately decided to stay on.
It is the first time a sitting Spanish prime minister has been called to testify in a judicial case since his predecessor Mariano Rajoy was summoned as a witness in 2017 in a graft case.
The case led to the conviction of several members of his conservative People's Party and ultimately to a 2018 vote of no confidence that allowed Sanchez to become prime minister.
(Reporting by Guillermo Martinez, Juan Antonio Dominguez, Juan Medina, Belen Carreno and Emma Pinedo, editing by Inti Landauro and Angus MacSwan)