MADRID (AP) — Spain's health minister has resigned hours after a judge said she benefited financially from an alleged corruption scheme that ensnared her ex-husband.

Ana Mato said in a statement Wednesday that she could not stay on because doing so could hurt the administration of Prime Minister Rajoy, who is scheduled to give an important anti-corruption speech Thursday.

Mato stressed that she was not charged and faces only the possibility of fines "because of my family situation at the time the alleged events occurred."

She may have to return 50,000 euros ($62,000) the judge says her family received for personal tourism and other expenses from the alleged Popular Party financing scheme that resulted in charges for 43 people.

Their ranks include three former party treasurers.