The nation's largest freight rail carriers announced Thursday they will extend health care benefits to the spouses of gay workers starting January 1.

“While this is not a benefit required by law or under current collective bargaining agreements, the railroads agreed with labor to provide the benefit in light of recent changes allowing same sex couples to access [the] same federal tax benefits provided to other married couples,” read a statement from the National Railway Labor Conference, which represents the largest freight carriers in the nation.

The announcement came just two days after two BNSF Railway engineers filed a lawsuit against the company alleging violations of the federal Equal Pay Act.

Cleveland Stockmeyer, who represents the two gay workers, told the AP that BNSF's company health plan refers to eligible dependents as “your husband or wife.” BNSF, the nation's second largest freight railroad network, is headquartered in Fort Worth, Texas.

“It shouldn't take a federal lawsuit to make a national company do the right thing,” Stockmeyer said. “If they tell me or my clients the benefits will be offered, and if they actually do it, we'll believe it. But they still need to account for denying them benefits for one year.”