MANHATTAN (CN) — Days after the White House banned major media from briefings, the New York City Police Department failed to avoid a lawsuit over a similar deprivation of access, as a federal judge issued a ruling that could have profound ripples for press freedom in the Big Apple.

“Members of the NYPD have prevented news photographers from taking pictures,” photographer Jason B. Nicholas wrote in an email. “They have prevented reporters from witnessing events by confining them to ‘press pens’ far-removed from newsworthy scenes; and they have summarily revoked the press credentials of journalists who had the integrity and the nerve to speak up, and assert their right to simply do their jobs.”

For many New York journalists, obtaining an NYPD press credential is an unavoidable hassle, and photographer Jason B. Nicholas has long had a more rocky journey than most. The department has yanked his pass three times over the past three years, most recently when the New York Daily News sent him to cover a building collapse in Midtown Manhattan on Oct. 30, 2015.

One construction worker had been dead and another trapped when Detective Michael DeBonis and Deputy Commissioner Stephen Davis corralled credentialed journalists into a “press pen” that was out of sight from the ongoing rescue efforts.

Nicholas slipped away about 150 feet into the street to take photographs. Police accused him of interfering with the operations because he was near an ambulance, but Nicholas insists that he was not close to any emergency workers.

The photographer claims DeBonis “physically seized” him, before Davis told Nicholas: “This is the last time you’ll do that.”

Nicholas sued DeBonis, Davis, then-Commissioner Bill Bratton, the NYPD and the city on Dec. 8, 2015, a little more than a month after the incident. The NYPD has been adamant about its sole discretion to grant or withdraw press credentials, a must-have for reporters seeking to cross police lines to cover crime scenes and emergency zones.

Launching a two-pronged attack on the policy, Nicholas argued that it was a viewpoint-based and arbitrary enforcement, and he decried “frozen zones” and “press pens” as too broad to pass constitutional muster.

U.S. District Judge Paul Oetken found that Nicholas stated a First Amendment claim, pushing the case to discovery on Monday.

“That press access implicates First Amendment rights and interests — held not only by the journalists, but also by the public at large — provides additional support for finding a protected interest in NYPD-issued press credentials,” Oetken wrote in his 19-page opinion.

“For far too long, the NYPD has bullied and interfered with journalists simply for doing their jobs,” Nicholas said in a statement.

He added that the decision “puts the NYPD on notice that actions like these will no longer be tolerated.”

“After today, journalists in New York need not fear doing their jobs vigorously, as their jobs are supposed to be done,” the photographer said. “If, after today, NYPD members interfere with press freedoms, federal judges in New York will hold them accountable.”

He likely will keep facing stiff opposition from the New York City Law Department.

“We will continue to defend the case,” a department spokesman said.

Nicholas acknowledged that he still has a tough row to hoe.

“While today’s ruling is not the last word in the case, it puts me, and all journalists, on a clear path to victory,” he said.

The New York ruling falls on the heels of a national controversy surrounding press access in Washington.

On Friday, President Donald Trump banned the New York Times, the Los Angeles Times, Politico and other news outlets from a White House press briefing in an action denounced by the American Civil Liberties Union as illegal.

Oetken’s ruling today lends support to the ACLU’s contention.

“It has been held impermissible to exclude a single television news network from live coverage of mayoral candidates’ headquarters and to withhold White House press passes in a content-based or arbitrary fashion,” Oetken wrote today.

“Equal press access is critical because “[e]xclusion of an individual reporter… carries with it ‘the danger that granting favorable treatment to certain members of the media allows the government to influence the type of substantive media coverage that public events will receive,’ which effectively harms the public,” he added.

On top of his career as a seasoned journalist and photographer, Nicholas is quietly racking up a string of pro se legal victories.

At the age of 19, Nicholas started to serve a lengthy prison sentence for manslaughter after he fired a sawed-off shotgun at a young man he thought had been trying to shoot him.

Behind bars, Nicholas organized a union to advocate for the rights of state prisoners in Orange County. He stumbled in getting the case off the ground in federal court before obtaining legal counsel for his appeal.

In 1999, the Second Circuit granted prisoners’ rights to unionize in Nicholas v. Miller, a decision that paved the way for Nicholas to establish a government education organization two years later.

After serving 13 years in prison, Nicholas earned his bachelor’s degree and worked as a researcher for legendary defense attorney Ron Kuby.

Nicholas said in an interview that he would continue his current case as an exercise in personal empowerment.

The photographer added another litigation success to his growing list late last year.

On Sept. 17, 2014, Nicholas tried to photograph National Football League’s commissioner Roger Goodell, who was protected by retired police detective Thomas Crowe. Nicholas says that Crowe slammed into him with his truck, threw him to the ground, punched him, and then had him arrested for assault.

Four months later, the Manhattan district attorney’s office dropped the charges after three eyewitnesses backed up Nicolas’s account. Crowe and the city settled a lawsuit Nicholas filed over the incident for $20,000 last October.

Nicholas said that police tried to shunt him to a “press pen” again at an NYPD officer’s funeral on Jan. 4, 2015, even though the ceremony had been open to the public. He says that police briefly confiscated his credentials for filming himself asking for the same access granted to pedestrians.

In addition to his individual due-process claims, Judge Oetken allowed Nicholas to pursue claims that the NYPD has a pattern and practice of interfering with journalists’ constitutional rights.

The Reporters Committee for Freedom of the Press did not immediately respond to a request for comment.