The House cleared farm legislation that renews agricultural subsidies and food aid for low-income families without a controversial provision backed by conservatives and President Donald Trump that would have toughened work requirements to qualify for assistance.

The bill passed 369 to 47 on Wednesday, a day after the Senate passed it 87-13. The measure now goes to Trump, who has indicated he supports it.

The five-year, US$867 billion legislation, which also would extend federal crop insurance, scrapped an earlier House provision that would have added work requirements for older food stamp recipients and those with older children. The provision had been included in the House version of the measure and was removed during negotiations with the Senate, where it faced opposition.

The bill requires governors to sign off on state requests for work requirement waivers in areas with high unemployment. Currently, able-bodied adults under age 50 without dependents are expected to work at least 20 hours a week or be in a training program to obtain benefits. But states can request waivers from those requirements for high-unemployment areas.

Another snag resolved by negotiators was a push by Agriculture Secretary Sonny Perdue and Interior Secretary Ryan Zinke to enact more permissive logging regulations. Such provisions weren’t included in the final legislation, according to a Democratic aide.

“Let us tell those farmers and ranchers and growers that are going through tough times that they’re going to be good for the next five years,” Senator Pat Roberts of Kansas, chairman of the Agriculture Committee, said on the Senate Floor.

Congressional approval of H.R. 2 comes after farm programs under current law began to expire Sept. 30. “We made the compromises we needed to make to get this deal done,” House Agriculture Committee Chairman Mike Conaway of Texas told reporters last month.

Trump told reporters at the White House on Tuesday that “the farm bill is in very good shape,” and “our farmers are well taken care of."

The bill found a champion in Senate Majority Leader Mitch McConnell of Kentucky, who cheered the inclusion of a provision that would make hemp a legal agricultural commodity, a boon to some farmers in his home state.

Under the farm bill, hemp would be removed from the federal list of controlled substances and hemp farmers will be able to apply for crop insurance. Unlike its biological cousin marijuana, hemp has industrial uses and doesn’t produce a “high” if ingested. Proponents say it has other therapeutic uses, such as easing pain and anxiety.

A provision that would have imposed a lifetime ban on people with drug-related felonies from working in the hemp industry was reduced to a 10-year ban. The legislation also includes an exemption letting farmers already growing hemp under existing research authority continue their operations.

The bill met with opposition from Senator Chuck Grassley, an Iowa Republican, who advocated for a provision to tighten subsidies for farmers. Instead, the bill expands the definition of family members eligible for subsidies to include first cousins, nieces, and nephews.

Final passage in the House came after Republicans attached an unrelated provision that blocks lawmakers from forcing the chamber to vote on certain Yemen legislation until a new Congress takes over in January. The provision limits lawmakers’ efforts to push back on the U.S. role in Yemen’s civil war and relationship with Saudi Arabia amid bipartisan anger over the killing of journalist Jamal Khashoggi in the kingdom’s consulate in Istanbul.