DUBAI, United Arab Emirates (AP) — After more than seven months behind bars in an Iranian prison, detained Washington Post correspondent and Marin County native Jason Rezaian has for the first time been allowed to hire a defense lawyer, according to his family.

It’s just not the attorney Rezaian’s family had hoped for.

The Iranian-American journalist’s family had been seeking to hire lawyer Masoud Shafiei, who has had experience dealing with sensitive cases involving foreigners and previously represented three American hikers arrested by Iran in 2009.

Ali Rezaian, the reporter’s brother, told The Associated Press in an interview last month that Shafiei had been prevented from dropping off paperwork that Rezaian must sign to enlist his services — effectively making him unable to formally defend him.

The judge overseeing the case set a Monday deadline to present a defense attorney, giving the family little choice but to hire someone new.

The family said in a statement that Shafiei “worked tirelessly under pressure from the judiciary” to seek approval to represent Rezaian, but it became clear he would not be able to do so.

Defense attorney Leila Ahsan will now represent the journalist, according to the family. She is also the lawyer for Rezaian’s Iranian wife, Yeganeh Salehi, a reporter for The National newspaper in Abu Dhabi.

“We are hopeful that her knowledge of the case and access to the files will ensure that there are no further unwarranted delays in the process,” Ali Rezaian and his mother, Mary, said in their statement.

The couple and two other journalists were detained by authorities on July 22. Two journalists, whose names have not been made public, were freed within a month of their arrest. Salehi was released in October.

Defendants in Iranian courts can have up to three attorneys, according to the family. The family expressed hope the legal team will still find a way to include Shafiei, “so Jason can finally have full access to his rights under Iranian law.”

Rezaian, 38, has been the Post’s correspondent in Tehran since 2012 and has also written for the San Francisco Chronicle among other publications. He was born and raised in Marin County and holds Iranian and American citizenship.

American officials repeatedly have raised concerns about Rezaian and other Americans jailed in Iran, which does not recognize dual nationalities for its citizens.

Rezaian faces unspecified charges in Iran’s Revolutionary Court, which mostly hears cases involving security offenses.

Judge Abolghassem Salavati has been assigned to hear the case. Known for his tough sentencing, he has presided over several politically charged cases, including those of protesters arrested in connection with demonstrations that followed the 2009 presidential elections.

The Post’s executive editor, Martin Baron, insisted that Rezaian’s defense team must be granted full, immediate access to Jason and his case file to bring an end to an ordeal that has been “so opaque and manifestly unfair.”

“At every turn, Iran’s handling of Jason’s case has served to reinforce an impression of state-sponsored injustice, as demonstrated by seven months of harsh incarceration without counsel or consular access,” Baron said.

___