Compensation for American Embassy personnel held hostage for 444 days in Iran more than three decades ago is being hailed by the former captives and the lawyers who for years fought Tehran and Washington to get a measure of vindication.

A provision buried in a spending bill signed by President Obama last week will give up to $4.4 million to each of the 37 surviving hostages or the estates of 16 others who died in the years since their release. The sum works out to $10,000 for each day of their captivity and will come, in part, from a $9 billion penalty paid by the French bank BNP Paribas for violating sanctions against Iran, Cuba and Sudan.

“Iran is not paying the money, but it’s as close as you can get,” said Thomas Lankford, an attorney who represented the former hostages and their families in a lengthy battle that continued even after the courts and the U.S. government repeatedly denied their requests for restitution.

The financial settlement also provides potential benefits for victims of other terrorist attacks, including the 1998 U.S. Embassy bombings in East Africa and for first responders to the Sept. 11, 2001, attacks.

The compensation for the hostages seized at the U.S. Embassy in Tehran and held between November 1979 and January 1981 brings some closure to the victims of one of the defining foreign relations crises of the 20th century. The crisis fractured relations between Iran and the United States and ultimately pitted the former hostages not only against the authorities in Tehran, but also against their own government.

They were barred from taking legal action against Iran under the 1981 Algiers Accords, brokered by Algerian diplomats, that led to their release. U.S. courts, the State Department and presidents all opposed their attempts to sue. So lawyers turned to Congress for help, but even those efforts failed time and again.

Some hostages said they thought the push to reconsider their claims came after the Iran nuclear deal in July, which angered many members of Congress, and after the 2012 Ben Affleck film “Argo,” a political thriller about the CIA’s rescue of six U.S. diplomats in Tehran.

“I think ‘Argo,’ followed by the Iran nuclear accord, was very instrumental,” said Joe Hall, 66, who was an Army chief warrant officer at the embassy.

The part of the bill that brought them vindication was introduced by Sen. Johnny Isakson, R-Georgia, chairman of the Senate Veterans Affairs Committee who counts three former hostages, including Hall, among his constituents. He had introduced compensation legislation for the hostages every year since 2013.

The law, signed by Obama on the day he left for vacation in Hawaii, also authorizes payments of $600,000 for each spouses or child of a hostage.

The $1.1 billion of the Paribas penalty set aside to repay victims of Iran and other terror attacks is not sufficient to cover all the claims, but the fund will remain open for 10 years so it can be replenished by future fines on sanctions violators.