While there are several origin stories that reference more miracles than reality, the official story is of Captain Baltazar de Abreu Cardoso, a Portuguese landowner, who would climb the hill to better see his plantations in Irajá. While doing this one day, he was surprised by a huge snake. Upon invoking the Virgin Mary out loud, a lizard appeared and attacked the snake. Thankful for the intervention, he built a chapel there where he featured the Virgin Mary. The Captain’s relatives, friends and neighbors, seeing the chapel from below, would climb up to see it in person. People soon went from saying “let’s visit the Virgin Mary at Penha” to “let’s visit the Virgin Mary of Penha”, as they still do today. As for the chapel, it was donated and rebuilt in 1728, and then again, in 1870 which, aside from some additions and remodeling, is what one sees today.
In Portuguese, a cragg or cliff is called a penhasco (unlikely where the name Penha comes from). More likely, it comes from Spain, more specifically Our Lady of Peñafrancia in Salamanca (related to the Virgin Mary), which became Penha da França in Portugal and thus the name was carried to Brazil.
The church in 1909, back when people also had picnics there in October
There are 382 steps in all, with the original 365 steps dug out of the rock through the initiative of a couple that received an “act of grace” in 1819. As the story goes, they had climbed up to the chapel two years prior and asked the Virgin Mary for a child, and soon after their prayers were answered.
Traditionally, October is the month to pay tribute to Nossa Senhora da Penha, as can be seen in the image above from 1950. All four Sundays of the month, the church would attract both the joyous and the unfortunate souls since some went to thank the Virgin Mary while others – those in need of miracles – went to ask favours of her. Many of the latter would climb the steps either shoeless, or on their knees, as a sign of devotion (and as thanks for a sucessful deal made with God – the famous “pagar promessa“). By the 1940s and 50s, the Festa da Penha, as the celebrations were called, became an opportunity for beggars and businessmen to make a dime from all the pilgrims.
I originally just wanted to tell the origin story but if I don’t stop here, I’m going to continue researching until there’s nothing left!