Officials at a Greek Orthodox church in Chicago are hailing a last-minute anonymous donation as a “Christmas miracle” after the donation kept the property from going into foreclosure.

The future of Holy Trinity Greek Orthodox Church was uncertain before the donation, as the church had been left with $8 million in debt and the property was at risk of being auctioned off, the Associated Press reported.

Parishioners bid farewell to the church at a final Thursday service thinking it would be the last time they would worship there.

But a last-minute donation came to save the church, which is one of the oldest Greek Orthodox churches standing in the Midwest.

Church leaders say a group of anonymous “guardian angels” came forward with a nearly $2 million donation just before the clock struck midnight on Thursday.

“We prayed for a miracle to happen, and we didn’t give up,” Rev. Nicholas Jonas said. “A group of guardian angels came forward.”

Although the donors, which are part of a nonprofit, wished to remain anonymous, church leaders confirmed with the AP that at least one parishioner is associated with the group.

The donation allowed the church to halt the auction and give it time to file for bankruptcy. Parish Council President Stanley Andreakis told the AP that the donation would also keep an investment bank firm from demolishing the church building.

The church will also have time to raise some extra cash by selling a closed school it owns in the Chicago suburb of Deerfield, CBS Chicago reported.

Thanks to the last-minute donation, the church will be open for worship over the weekend before the Christmas holiday.