It was an unholy mistake — that became one town’s miracle.

In 2012, an amateur art restorer in the small village of Borja, Spain, turned her attention to a fresco of Jesus Christ called “Ecce Homo” (“Behold the Man”). Alas, Cecilia Giménez’s “fix” rendered the face of Jesus — painted in 1930 by Elías García Martínez — wholly unrecognizable. Ecce Homo 2.0 became a global laughingstock, compared to a blurry potato and a monkey.

More than 160,000 visitors have flocked to the Sanctuary of Mercy church since the botched restoration, scooping up “Ecce Homo” souvenirs from pens ($2) to mugs ($7) to wine featuring Jesus’ tragically altered face on the label (approximately $4 to $11 a bottle).

The global curiosity has led to a boom in tourism that’s allowed restaurants and museums in Borja, population 5,000, to remain stable during Spain’s crippling recession.

 “The level of these numbers [of tourists] . . . has never happened before,” says Elena Aznar Martinez, who handles marketing for “Ecce Homo.”

“The visitors recognize me,” Giménez, 85, an amateur painter who had performed multiple church-sanctioned renovations of “Ecce Homo” over the years, tells The Post. “They take photos with [the painting] and with me . . . even though I tell them, ‘My children, I’m not an important person.’ ”

Visitors are charged 1 euro per person to enter the church for viewing, and all proceeds go to a church-affiliated nursing home. Fifty-one percent of the proceeds from souvenir sales go to the nursing home, while 49 percent go to Giménez, who uses the money to care for her 56-year-old son, José Antonio, who has cerebral palsy.

Modal TriggerTourists scoop up “Ecce Homo” souvenirs from $2 pens to $7 mugs to $4-$11 bottles of wine.

“When news broke [of “Ecce Homo”], I felt humiliated,” says Giménez. She claims she had only begun a part of the restoration before leaving on a vacation and intended to finish it upon her return, but was stopped by the church.

The painting’s since been found impossible to restore from its current state. At one point, García Martínez’s horrified heirs had threatened to sue Giménez for destroying the painting, but that never happened.

On Wednesday, a museum dedicated to the fresco will open. And in August, a comic opera entitled “Behold the Man” will debut in Borja, and its creators — Americans Andrew Flack and Paul Fowler — hope it becomes an annual event.

This article originally appeared on