The NYPD went on a taxi ticketing blitz outside a mosque on the Upper West Side while drivers were inside reciting Ramadan prayers Friday, The Post learned.

At least one officer handed out nearly 100 tickets on the streets surrounding the Islamic Cultural Center on Riverside Drive near West 72nd Street, said cabby ­Mohammad Zaman.

“This is a special prayer time, a time for religion. We double-park here every Friday and they [allow it], but today they gave us all tickets, almost 100 cabs,” he said.

Zaman, who has been attending services at the mosque for nine years, was slapped with a dreaded orange envelope that held a $115 greeting for double parking.

“This has never happened ­before,” he said.

“I can’t help but to think they are being prejudiced. They don’t understand. We have to be here.”

His ticket incorrectly listed the violation date as Saturday, June 27, he said. The wrong date on the ticket could get him off the hook.

Ramadan this year is observed from June 17 through July 17.

A volunteer at the mosque said cops used to cut cabbies a break.

But this year, “maybe three or four times [this month] I’ve seen them go down the line giving tickets to cabs, and [they’re] getting strict again,” the volunteer said.

An NYPD spokesman said that while individual precincts may make accommodations in extenuating circumstances, such as the Ramadan observation, double parking is never authorized, citing, for example, the need for emergency vehicles to navigate the roads.

A source at the 20th Precinct, which covers the mosque, said he wasn’t aware of an organized ticket blitz.

He added that cops at the precinct have a good relationship with the mosque.

“It is mandatory in our religion to come to the mosque every Friday. It’s our duty. Other places they are OK with double parking — people do it everywhere here — but now they won’t let us? Most of us only come for one hour,” said cabby Mohammad Choudhury.

Driver MD Shomuz, who has been going to the mosque for six years, said, “No one has been given tickets before, but today ­everyone got one.”

“It’s frustrating, but what can I do?” he said.