WASHINGTON–Washington Post reporter Jason Rezaian and his wife, Bloomberg journalist Yeganeh Rezaian, were preparing to attend a surprise birthday party for Yeganeh’s mother when Iranian agents came to the building where the couple lived in Tehran.

The agents, one with a gun and three in plainclothes, took the Rezaians back to their apartment and ransacked it, confiscating phones, computers and identification documents. Rezaian said about a dozen more agents with guns and video cameras came into the apartment.

“That was the moment my life in Iran…ended,” Rezaian said Wednesday at a discussion promoting his new book “Prisoner.”

After the apartment search, the Rezaians were arrested and taken to Evin Prison, where Jason was held for 544 days until his release on Jan. 16, 2016.

Rezaian, who was the Tehran bureau chief for The Washington Post, was convicted of espionage in a closed-door trial in Iran in 2015. He was never sentenced.

Speaking to fellow Washington Post columnist David Ignatius, Rezaian said the prison guards securing his cell called themselves his “imposed brothers.”

During his interrogations, the agents found seemingly random pieces of “evidence” to question him about, he said. For example, they printed out an email Rezaian had sent to a friend apologizing for being “silent” the previous few days. That phrase was highlighted, and agents attempted to use it against him.

“It was like something out of a mad dream—a confusing dream,” he said.

Rezaian said he was threatened and traumatized by the agents, , who told him The Washington Post “did not exist” and that the United States “would not lift a finger” for his release.

He has concluded that the motivation for his arrest was that the Islamic Revolutionary Guard Corps, a branch of Iran’s armed forces, wanted to disrupt negotiations for the Joint Comprehensive Plan of Action, more commonly known as the Iran nuclear deal. The IRGC did not want these negotiations to happen, and his own arrest, he noted, definitely complicated a possible deal.

In the end, Rezaian’s release did involve the Iran nuclear deal. Washington Post reporter Carol Morello said in the introductory video the deal was a complex exchange of Iranian and American hostages that involved briefly lifting and then reinstating sanctions on Iran, signing the nuclear deal and negotiating outstanding payments, all within the span of three hours.

“I sat there with my jaw open,” she said. “I started thinking, what is going to be my lede? Oh my God,” getting a laugh from the audience.

Rezaian was able to return to the United States, along with his wife, who was imprisoned only two months, and three other prisoners.

Rezaian criticized President Donald Trump’s decision to withdraw the U.S. from the Iran nuclear deal because as far as watchdog organizations could tell Iran was sticking to the rules laid out in the agreement. Rezaian also opposed what he called the “crippling” sanctions Trump is imposing on Iran, saying they are hurting the Iranian people more than the government.

While the number of journalists imprisoned in Iran has gone down since Razaian’s imprisonment—from 54 in 2010 to eight currently—Iran’s government has found other ways to attack journalists and harass Iranian journalists who flee the country, according to Sherif Mansour, Middle East and North Africa program coordinator for the Committee to Protect Journalists.

“Jason Razaian’s long imprisonment and what he has suffered was made to send a message—not just to the U.S. but also for local and international journalists—that the government is willing to conduct a sham trial and use the most horrible ways to punish any journalist and will only release them when they get what they want,” Mansour said. “This is something news organizations have to think about.”

Washington Post Publisher Fred Ryan called Rezaian’s imprisonment a “nightmare for people who value press freedom around the world” and said reporter safety is Paramount at the Post . The Post has a team that briefs correspondents on safety precautions, he said, and the same team also oversees specific actions reporters can take depending on where they are to ensure their security.

“It’s becoming more challenging, obviously, but it’s something that’s a top priority for us,” Ryan said.

Rezaian can no longer return to Iran, but said he and his wife, who grew up in Iran, miss living there.

“I’m sad that we’ll never be able to go back to that same life the way that we had it, but I’m also hopeful and I know that at some point, I’ll go back to Iran.”