The New York Times reporter James Risen, who faces jail over his refusal to reveal a source and testify against a former CIA agent accused of leaking secrets, has called President Barack Obama “the greatest enemy of press freedom in a generation”.

Speaking to his colleague Maureen Dowd, Risen accused the president of aggressively pursuing journalists, including himself, who report sensitive stories that reflect poorly on the US government.

Risen faces jail over his reporting of a botched intelligence operation that ended up spilling nuclear secrets to Iran. The Justice Department has long been seeking to force him to testify and name the confidential source of the account, which is contained in his 2006 book State of War.

Risen recently failed in an attempt to have the supreme court review an order for him to testify, and acknowledges that he has exhausted all his legal options against the Justice Department’s pursuit of him under the controversial Espionage Act. In the face of incarceration that could come as early as this autumn, he is resorting instead to journalistic defiance.

Risen would be the first journalist to go to prison for failing to divulge sources since 2005, when the former New York Times reporter Judith Miller was jailed for contempt of court, after refusing to testify about a source before a federal grand jury.

“I was nervous for a long time, but they’ve been after me for six years so now I try to ignore it,” Risen told Dowd.

The pursuit of Risen began under the administration of President George W Bush. The Justice Department tried to prosecute him under the Espionage Act for his 2006 Pulitzer Prize-winning scoop about the illegal wiretapping of American citizens after the terrorist attacks of 11 September 2001. It also targeted him for the revelations in State of War.

The Bush administration arrested Jeffrey Sterling, whom Dowd on Sunday referred to as a “disillusioned” former CIA operative, and accused him of being the source of Risen’s leak about Iran. The Obama administration continues to attempt to force Risen to testify against Sterling and name him as his main source.

Risen is furious at statements from the likes of Obama and the attorney general, Eric Holder, about supporting press freedom – including condemnation of the police in Ferguson, Missouri, for this week arresting journalists reporting on riots there.

Obama and Holder said journalists should not be arrested or harassed for doing their jobs and covering “a story that needs to be told”. In May, Holder said of the Sterling case: “No reporter who is doing his job is going to go to jail.” Risen, however, could be behind bars within weeks.

Dowd asked Risen how the Obama administration could use the Espionage Act to imprison reporters and whistleblowers while not acting on the acknowledged use of torture by the CIA on terrorism suspects and the same agency spying on the US Senate.

“It’s hypocritical,” Risen said. “A lot of people still think this is some kind of game or signal or spin. They don’t want to believe that Obama wants to crack down on the press and whistleblowers. But he does. He’s the greatest enemy to press freedom in a generation.”

Last week, groups campaigning for press freedom handed a petition with more than 100,000 signatures to the Justice Department, urging it to drop the case against Risen.

“It’s surreal to be caught up in a news story instead of writing about one,” he told Dowd.