Spain's Attorney General, Álvaro García Ortiz, has been forced to step down after being found guilty of revealing confidential information in a deeply controversial case, which accentuated the country's political division.

The Supreme Court found that García Ortiz had unlawfully revealed details of the tax status of businessman Alberto González Amador, boyfriend of a senior conservative politician.

The court handed him a two-year ban from the post and a fine of €7,200 (£6,438). He must also pay €10,000 to Mr González Amador as compensation.

The trial of García Ortiz fuelled already acrimonious relations between the left-wing government of Prime Minister Pedro Sánchez and right-wing opposition.

Their contrasting positions were underlined by reactions to the conviction.

Sánchez must apologise to Spaniards, resign and call elections, in that order, said Ester Muñoz, spokeswoman for the conservative People's Party.

The government stated it did not agree with the ruling but respected it and would proceed with the appointment of a new attorney general.

However, a number of politicians on the left expressed outrage at what they saw as a politically motivated ruling.

Health Minister Mónica García, of the Sumar party, said the conviction dealt a lethal blow to [the concept of] presumption of innocence and threw ordinary Spaniards under the bus when it came to the rule of law.

The complex case dates back to March 2024, when the attorney general's office issued a press release stating that Mr González Amador had requested a plea bargain after being found to have evaded tax payments worth €350,951.

The document corrected mistaken press reports stating that the attorney general's office had proposed the bargain.

The source of the incorrect reports was the head of communications of the conservative regional president of Madrid, Isabel Díaz Ayuso. Ms Díaz Ayuso is the partner of Mr González Amador.

Mr González Amador filed a complaint against the attorney general, claiming his privacy had been breached. The case against García Ortiz also saw him accused of leaking information about the affair to the media. Prosecutors pointed to the attorney general's decision to change his phone as incriminating.

However, there was no direct evidence linking García Ortiz to the leak and several journalists testified during the trial that he had not been the source of their information. Regarding the press statement, the attorney general said he was simply correcting the erroneous reports.

García Ortiz can appeal against the ruling.

This comes as a severe blow for the prime minister, who has been under judicial pressure on various fronts.

His brother is due to go on trial for influence peddling, his wife is under investigation for her business activities and two former senior figures in the Socialist Party, José Luis Ábalos and Santos Cerdán, are accused of overseeing a massive kickback scheme.