By Nick Thorpe
BBC News, Budapest
The president of Hungary has resigned live on television over a decision to pardon a man convicted of covering up a child sexual abuse case.
It was revealed last week Katalin Novak had given clemency to a man jailed for forcing children to retract sexual abuse claims against a director of a state-run children's home.
Protests calling for her to step down had been growing in Hungary.
Ms Novak apologised and said she made "a mistake" in granting the pardon.
The controversy which led to her resignation came after the names of 25 people pardoned by Ms Novak in April last year, as part of a visit to Hungary by Pope Francis, were made public by Hungarian media last week.
On the list of convicts was the deputy director of a children's home near Budapest, who had been jailed for three years after forcing children to retract claims of abuse against the director of the home.
The director had himself been jailed for eight years over abusing children at the government-run facility.
Hungarian opposition parties and protesters had been demanding her resignation, but Ms Novak's decision to do so was as sudden as it was unexpected.
Ms Novak is a popular figure in the ruling Fidesz and a rare female politician in a male-dominated country. She is a key ally of Hungarian Prime Minister Viktor Orban and previously worked as his family minister.
In 2022, she became the first woman to hold the largely ceremonial role of Hungarian president.
But the case unleashed an unprecedented political scandal for Hungary's long-serving nationalist government.
In particular, it caused deep embarrassment for Fidesz, which has made traditional family values the cornerstone of its social policy.
Speaking in an address live on television, Ms Novak said she granted the pardon in the belief the convicted man "did not exploit the vulnerability of the children under his oversight".
She apologised to victims who "might have felt that I did not stand up for them".
"I made a mistake, as the pardon and the lack of reasoning were conducive to triggering doubts about the zero tolerance that applies to paedophilia," Ms Novak added.