PRESIDENT OBAMA offered encouragement to the family and colleagues of Post reporter Jason Rezaian last weekend, saying, “ We will not rest until we bring him home to his family, safe and sound.” We hope Mr. Rezaian, who had been imprisoned in Iran for 281 days as of Wednesday, will hear of the president’s words. More important, though, they should be weighed by Iran’s supreme leader, Ayatollah Ali Khamenei, who must realize that the unjust detention of an American journalist is only harming his regime.

The Rezaian case has become a showcase for Iran’s ruthless internal power struggles and the politicization of its judicial system. The 39-year-old reporter, who was born and raised in California but is an Iranian and U.S. citizen, has been described by Iranian Foreign Minister Mohammad Javad Zarif as “a good reporter” and a “friend.” Yet he has been held in Tehran’s notorious Evin Prison since July 22, apparently at the instigation of intelligence and judicial authorities.

Not until last week was Mr. Rezaian allowed a substantial meeting with his attorney. A statement she provided afterward said he was charged with four crimes, including espionage, “collaborating with hostile governments,” “propaganda against the establishment” and “collecting information about internal and foreign policy and providing them to individuals with malicious intent.” On Wednesday, Mr. Zarif suggested that a “low-level operative” for the U.S. government might have tried to “take advantage” of Mr. Rezaian by asking him to gather information.

Both Post Executive Editor Martin Baron and the White House quickly pointed out that the accusations are absurd. As Mr. Obama said, Mr. Rezaian is guilty of doing nothing more than “writing about the hopes and fears of the Iranian people.” His attorney’s statement said the case file she read offered no evidence to back up the charges. But she also told Mr. Rezaian’s family that she does not expect to be allowed to meet with him again before his trial, making it difficult to prepare a defense.

This blatantly unjust treatment is showing Iran to be a country where well-meaning foreign visitors, including potential Western investors, are vulnerable to being seized as hostages or used as pawns in power struggles they have nothing to do with. It shows that the judiciary does not observe minimal standards of fairness or even adhere to Iran’s own laws. It suggests that the government of President Hassan Rouhani cannot be counted on to deliver on its international commitments — including the prospective nuclear accord — because of its inability to control the intelligence services, Revolutionary Guard and other reactionaries.

Mr. Obama has declined to make the release of Mr. Rezaian and other imprisoned Americans a condition for going forward with the nuclear accord. According to Haleh Esfandiari, a scholar at the Woodrow Wilson Center who was held prisoner in Iran for 105 days in 2007, doing so might play into the hands of those responsible for Mr. Rezaian’s detention, who may hope to use his case to block any U.S.-Iranian detente. But Mr. Obama should look for other ways to make clear to Mr. Khamenei that he is serious about the commitment he made to the Rezaian family. As long as the journalist is held, Iran should pay a price.