On the eve of Jesus' birth, the only thing Joseph and Mary wanted was a roof over their heads.

That was all the parishioners of St. Peter's Episcopal Church wanted, too, as they wandered from temporary home to temporary home this summer and fall while the roof of their historic Society Hill church was restored.

On Monday, Joseph and Mary, played by Harry Tobin and Adair Nelson at the St. Peter's Christmas Eve pageant and family service, found a roof in a humble manger surrounded by toddlers and grade-schoolers dressed as cows, donkeys, angels, and shepherds.

The members of St. Peter's got their roof, too - just in time for Christmas. In May, the parish of about 400 households learned that the roof of the church, which predates the American Revolution, was at risk of collapse. Since then, the parishioners had worshiped in donated space. Society Hill Synagogue offered them a place, as did Christ Church, Old St. Joseph's Church, and Old Pine Community Center.

On Christmas Eve, the congregation celebrated a return to the historic church at Third and Pine Streets, singing "Silent Night" and "Joy to the World" as snow fell. Scaffolding for the repair still surrounds the building, and plywood boxes protect two statues near the ceiling from anything that might fall during the remaining work, but the church otherwise was ready to welcome members back.

"It's extraordinary to be back in the church on this holy night when we celebrate the birth of our savior," the Rev. Ledlie I. Laughlin told the congregants.

If the church's red brick and Georgian windows make it look like a place where George Washington would have worshiped, that's because he did. He was occasionally a guest of Philadelphia Mayor Samuel Powel, taking a seat in one of the church's pews, which were designed with high backs and doors to retain heat in winter.

The church had its first service in 1761, and the bells in its steeple were cast at the Whitechapel Foundry in London, which also birthed the Liberty Bell. Slaves worshiped here, too. One, Absalom Jones, founded the first African American Episcopal church, the African Church of St. Thomas, in 1794.

But around the time the church celebrated its 250th anniversary, it became clear that something was rotten in this house of God - specifically, the roof. In 2010, St. Peter's hired S. Harris Ltd. to assess the structural integrity of the roof. The study revealed that moisture had infiltrated the beams, which had been constructed from sweet-gum trees more than 21/2 centuries ago.

Engineers warned that the roof risked "catastrophic failure," meaning it could collapse into the balcony and bring down the entire structure. And so, parishioners began wandering to worship in donated space, learning a few things about their congregation along the way.

When they held services at the Old Pine Community Center gym, they gathered in a circle, drawing their community tighter.

"It allowed us to be much more informal and much more intimate, which is a good thing," said assistant rector Claire Nevin-Field. "Church people like to preach that a church is not a building, it's people, and we experienced that in a new way." Parishioners embarked on a $1.8 million fund-raising campaign to replace the roof, reinforcing its wood trusses with steel.

They have raised about $1.6 million so far, much of it $50 or $100 at a time. Church members gave, but so did neighbors who did not belong. The children at St. Peter's School, which is nearby but independent of the church, held a bake sale.

"They came bearing gifts," Laughlin said during the Christmas Eve service, "so that we could raise the roof of St. Peter's Church."