She has been dubbed the "grandma of Fuerteventura" and was sent to prison for refusing to tear down her family home on the order of planning authorities because she said her family had nowhere else to live.
But on Thursday evening Josefa Hernández, 62, was released from prison after serving just four days of a six month jail sentence after her case received national attention and won her sympathy across Spain.
The inherited home, where Hernández lives with two of her seven children and three young grandchildren, had been built in the small town of Betancuria on the island of Fuerteventura in the Canary Islands in an area that was later declared a national park.
"Before it was a protected area, the land belonged to my parents," she previously told newspaper El Pais.
Lawyers acting for Hernández insisted that the mother of seven had not demolished her home because she had no where else to live and that she feared for the effect a move might have on one of her children who has a disability.
Family members also expressed health concerns because Hernández suffers from diabetes and hypertension, according to El Pais.
Various political groups called for her clemency, including members of the left-wing Podemos political party, but despite widespread outcry she was still made to go to prison on Monday.
But good news came on Tuesday when Spanish Prime Minister Mariano Rajoy pledged to grant a pardon for Hernández by Friday, calling it a measure of "common sense".
She was released from prison on Thursday evening to be met by a rapturous welcome from supporters.
"Where are my treasures?," Hernández called out at the gates of Tahiche prison in Lanzarote where she was reunited with her family in front of assembled media.
"Grandma was on vacation for two days," she told her excited grandchildren.
As part of the condition of her release, Hernández will still have to demolish part of the house. The town's mayor and other officials will help determine next week which parts of the house should be torn down to satisfy the court, according to broadcaster RTVE.