One person on Long Island just bought a ticket to heaven – by anonymously donating a $3 million winning lottery ticket to his or her church.

The mystery miracle worker handed the scratch-off ticket to Pastor Bert Crabbe at the True North Community Church in Port Jefferson Station last month, with the intention the cash be used for the benefit of the congregation.

Crabbe said the massive windfall was truly manna from heaven, since the church had become too small and desperately needed to be expanded.

During a sermon last month, Crabbe recalled, “I said that unless God drops a couple million dollars on us, we’re going to have to rent somewhere else. I actually said that.”

The church will now get $102,000 per year – after taxes – for the next 20 years. Crabbe said his lawyers will be looking for a way to get some of the money withheld by the lottery refunded, because the church is a nonprofit.

“It’s a miracle,” Crabbe said. “When someone gives away $3 million, that’s a miracle.”

He said he was stunned when the donor called him over for a visit in late July and told him about the winning Bada Bling game scratch-off ticket, which was purchased at a store in Middle Island.

Like Doubting Thomas, the 34-year-old pastor wouldn’t believe it until he saw it. Then the person – Crabbe wouldn’t say if it was a man or a woman – retrieved the ticket from a safe deposit box and handed it over.

“Seeing the actual ticket added some finality to it,” Crabbe said. “I was just amazed by their generosity. I think this person really believed in what we’re doing at this church.”

After getting the ticket validated by the lottery, Crabbe told the congregation of its good fortune at services this past Sunday.

The church’s current building on Terryville Road only holds about 200 people. Now the church can erect a building big enough to hold the whole 650-person congregation.

Crabbe said that the church will also give some of the money to charity. He said that some of the dough will go to a group called Love 146, which works to fight human trafficking.

True North is the sort of hip, new church where the pastor keeps a blog and sermons are available for downloading on its Web site. Crabbe even talks about what’s on his iPod (“Breakfast in America” by Supertramp).

Despite this, Crabbe did say he had to assure congregants the church had not plunged into betting as a way to raise money.

“Obviously we do not endorse gambling,” he said.

selim.algar@nypost.com