Pilgrims hoping to ride SEPTA’s regional rails lines to see the pope in Philly might want to start praying for a bit of good luck. 

The transit agency on Tuesday announced a lottery for the special tickets that will be required to use regional rail on Sept. 26 and 27, the weekend of the papal visit. 

The announcement comes about a week after huge demand for the passes crashed SEPTA’s website.

Customers can register for the lottery on August 3 from one minute after midnight to one minute before at the end of the day. Results will be announced August 6.

“What we’ve learned is, when you have a high demand and limited quantity, a real-time commerce site is not a viable solution,” said SEPTA spokesman Jerri Williams.

She said each entry will have an equal opportunity to win.

“It does not make a difference when you submit your information,” Williams said. 

SEPTA plans of offering limited service that -- on each regional rail line -- will travel from one or two far-flung stations directly into Center City. 

It’s important to note that the tickets themselves are -- unlike typical regional rail tickets -- only good for specific stations and only for reserved times. 

About 350,000 of the tickets will go on sale. 

On the day the sale crashed SEPTA’s website, about 54,000 people tried to get tickets in the first moment. There appear to be concerns that at least some of the demand was the result of speculation or scalpers.

Before the lottery is held, the transit agency will make efforts to limit the number of duplicate entries in hopes of reducing scalping. Customers will be able to buy up to 10 passes. 

“We want to get these papal passes into people’s hands so they can make serious decisions about their papal plans,” Williams said. 

Williams also said that the agency will hold a lottery for the high speed trollies going to Norristown, Sharon Hill and Media. They’ll make a more detailed announcement about that next week. 

Finally, the transit agency will make about 750,000 three-day transit passes good for the subway and buses. She said regular transit passes can also be used for subways and buses, but passes will not work for regional rail lines.