The Senate unanimously passed legislation codifying presumptive disability benefits status for so called “blue water” Vietnam veterans on Wednesday, sending the bill to the White House to become law.

The move came roughly six months after the measure was stalled in the Senate by parliamentary objections and just a week after the end of a legal battle surrounding the Vietnam veterans’ benefits that has drug on for years.

The legislation, passed unanimously by the House last month, has been a focus of advocates fighting to ensure nearly 90,000 veterans who served on ships in the seas around Vietnam are granted the same Veterans Affairs benefits status as troops who served on the ground or on ships stationed close to shore.

Under current regulations, those troops were assumed to have been exposed to toxic defoliants like Agent Orange, and were given special fast-track status when illnesses related to that chemical contamination surfaced later in life.

But in 2002, VA officials ruled that presumptive status did not apply to the blue water veterans. As a result, they had to conclusively prove their identical illnesses were a result of toxic exposure and not issues that occurred after their military service.

Given the lack of chemical monitoring on the ships at the time and the decades that have passed since the exposure, many veterans found that decision an unfair and unrealistic barrier. Earlier this year, a federal court agreed, ordering the VA to return the blue water veterans their special disability status.

Last week, Department of Justice officials announced they would not appeal that decision to the Supreme Court, effectively ending the fight.

But House lawmakers and several veterans groups pushed for the Senate to finalize the House’s blue water veterans bill, arguing that codifying the decision would ensure that future court cases would not produce a different result.

The bill now headed to the president’s desk does go further than the court ruling’s, expanding certain presumptive benefits to troops who served in the Korean Demilitarized Zone and to children of herbicide-exposed Thailand veterans born with spina bifida.

VFW National Commander B.J. Lawrence in a statement last week said the legislation was also needed “to ensure the Department of Veterans Affairs can never again interpret the intent of law differently.”

Senate Veterans’ Affairs Committee Chairman Johnny Isakson, R-Ga., had pushed for Senate action on the issue for the last year and praised the final passage Wednesday.

“It is our responsibility to make sure our veterans are provided the benefits they have earned,” he said in a statement. “I look forward to President Trump signing this legislation into law, and I will work with the VA to ensure Blue Water Navy veterans begin receiving these benefits.”

His House counterpart, Rep. Mark Takano, D-Calif., said the bill’s passage means “we can finally tell the tens of thousands of veterans who were exposed to Agent Orange during the Vietnam War but wrongly denied benefits that justice is coming.”

But the legislation does have its critics. John Wells, retired Navy commander and the executive director of Military-Veterans Advocacy (which helped file the blue water lawsuit), has criticized the legislation in recent weeks for limiting the scope of veterans potentially covered under the legal ruling.

And the legislation would pay for the presumptive benefits status — expected to total $1.1 billion over 10 years — with a new fee on certain VA home loans.

No timetable has been set for when the president may sign the measure into law. VA officials opposed the legislation last year, but have dropped their concerns since the court decisions against them.