A U.S. hostage is displayed to a crowd in Tehran on Nov. 9, 1979. (AP)

They were taken captive in Iran, where they endured mock firing squads and beatings.

After their release, they spent decades fighting for compensation, first in U.S. courts, then through Congress and finally won a victory three years ago.

But now, 40 years after the revolution that spurred their kidnapping, survivors among the 53 American hostages held after the U.S. Embassy was overrun say they are facing new frustrations.

Legislation passed in 2015 granted them up to $4.44 million each, or $10,000 per day of captivity. But only a fraction of the money has come through.

“They were heroes,” said Bryan Belk, son of former hostage William Belk, who recently died. “Our country was supposed to take care of them.”

The former hostages’ struggle now is not with a foreign country or even their own government, but with another group of claimants — family members of 9/11 victims who have recently gained access to the fund.

The Tehran hostages were not the only beneficiaries of the 2015 United States Victims of State Sponsored Terrorism Act, which also allows payments to other Americans who win awards for damages in federal courts against countries that have been officially designated state sponsors of terrorism — North Korea, Sudan, Syria and Iran.

The hostages and their families say they were surprised to see relatives of 9/11 victims win judgments against Iran, despite the fact that the official report on the 2001 attacks “found no evidence that Iran . . . was aware of the planning.” Last year, for example, in a lawsuit filed on behalf of more than 1,000 relatives, a federal judge in New York ordered Iran to make payments ranging from $12.5 million per spouse to $4.25 million per sibling.

“I haven’t read anywhere that 9/11 was caused by Iran,” said Kenneth R. Feinberg, the attorney who has been administering the USVSST payouts.

But now, he says, he is faced with a “dilemma” as relatives of 9/11 victims apply for compensation from the USVSST fund, “filing claims saying, ‘I’m a sibling, a grandfather, a cousin.’ ”

The hostages emphasize they bear no ill will against the 9/11 families.

Congress acknowledged there were other mechanisms available for deserving victims, specifically referencing the 9/11 fund, said Stuart Newberger, a specialist in international law at Crowell and Moring.

This legislation, said Newberger, was designed to compensate people like the victims of embassy bombings in Africa whom he represents and the Tehran hostages who had no other means of collecting.

The problem arose, Newberger said, when Justice Department lawyers interpreted the law to allow 9/11 family members to get a judgment against Iran and apply to the USVSST fund.

“The careful balance that had been constructed to ensure all deserving victims and families receive compensation has been upended in a way no one anticipated three years ago,” he said.

To Barbara Rosen, wife of Barry Rosen, the embassy’s press attache, “It’s like saying that people who suffered from Catholic church sexual assaults can sue Protestants.”

The impact is evident in the shrinking payouts.

There were 2,116 claimants for the initial round of payments in 2017. The former hostages received 13.66 percent of their award. Some took overseas trips with their families; others made plans to support philanthropic causes.

The USVSST website lists an additional 3,743 for second-round payments. The payout rolled out in January is far smaller — at just 4.2 percent.

“It doesn’t take a mathematical genius to figure out what’s happening,” said their attorney, Thomas Lankford, who argues that the hostages — the “oldest victims of modern terrorism” — should have been paid a lump sum.

“The effect has been, if you please everyone, you please no one,” said John Limbert, 76, a former hostage who went on to become deputy assistant secretary of state for Iran.

The American hostages were captured by Iranian students, who stormed the embassy in 1979, prompting a diplomatic crisis between the two countries. Their 444-day ordeal captivated the world, as they were paraded, shackled, in front of cameras.

Their release came in 1981 after Algerian diplomats brokered a deal on their behalf. But the agreement left them, unlike many victims of terrorism, unable to take legal action against Iran. The Algiers Accords required the United States to “terminate all legal proceedings in United States courts involving claims of United States persons and institutions against Iran.”

Some victims of terrorism have won awards of hundreds of millions in U.S. courts, although collecting has often proved challenging.

The Tehran hostages received $50 for each day of captivity after their release but were repeatedly rebuffed by the courts, with government lawyers arguing that the Algiers Accords were still binding.

After failing in the courts, the former hostages turned to Congress, winning support from both Democrats and Republicans, including Sen. Johnny Isakson (R) of Georgia, the home state of three of the hostages.

The 2015 law established a means for them to collect — not directly from Iran but from fines levied on organizations that do business illegally, including a portion of the $9 billion penalty paid by the Paris-based bank BNP Paribas for violating sanctions against Iran, Cuba and Sudan.

Rodney “Rocky” Sickmann recalled driving through St. Louis when his car radio confirmed their compensation had come through.

He stopped his car, overwhelmed with relief and joy.

“I cried, thinking I was finally going to get some satisfaction,” the former marine recalled.

Now those feelings have turned to disappointment.

The hostages told Feinberg of their frustrations in a December conference call.

“They took me to the woodshed,” said Feinberg, who has overseen payouts following many mass disasters including the $10 billion September 11th Victim Compensation Fund, which was set up by Congress to compensate victims or their families who agreed in exchange not to sue the airlines. That fund plans to cut payouts by as much as 70 percent as it struggles with a surge of new claims, officials said this month.

Feinberg, who has announced his retirement from administering the USVSST fund, is sympathetic to the hostages’ concerns, as he is to 9/11 relatives, but bound by the letter of a law he did not write, he said.

“Congress ought to fix it,” he said.

An Isakson aide said the senator has serious concerns about whether the fund is being managed the way Congress intended.

In an email, Isakson said he stood “ready to assist should any additional congressional action be needed to ensure the Tehran victims receive the compensation they are owed.”

But with an average age of well over 70, some of the former hostages say it is hard to keep on fighting.

“We have been slow-rolled by parts of the U.S. government for decades,” Limbert said. “It’s obvious what they were trying to do,” he said. “Wait us all out until we were all dead.”

Sixteen of the hostages did not live to see the 2015 legislation pass. Belk, the 17th, died in mid-December. His image — standing ramrod straight in a blindfold and handcuffs — came to symbolize their ordeal, and he never recovered from the trauma, according to his son, who is also pursuing efforts to have his father buried with full honors at Arlington.

“He would cover up windows in the garage,” Bryan Belk said, “and not sit in a restaurant with his back to the door.”

The uncertainty irks even those who were surprised to receive any money at all.

“When the award was made I was honored that Congress would consider us,” said Kathryn Koob, one of two women to have been held for the full 444 days. Now, though, she has had to put plans on hold to fund a chair in world religion.

“We are being held hostage again,” she said.