TOPSHOT - The US Capitol is seen in Washington, DC on January 22, 2018 after the US Senate reached a deal to reopen the federal government, with Democrats accepting a compromise spending bill. / AFP PHOTO / MANDEL NGAN        (Photo credit should read MANDEL NGAN/AFP/Getty Images)
CNN  — 

The House of Representatives passed the final version of a massive farm bill Wednesday, clearing a major, must-pass item from the legislative agenda before the end of the year and the start of the next congressional session.

The bill, which passed both the House and Senate with strong bipartisan support, next heads to President Donald Trump’s desk for his signature. In the Senate, the vote on Tuesday was 87-13, and in the House, it was 369-47.

The five-year farm bill is monumental legislation that addresses a wide range of areas including farming, nutrition, conservation, trade, energy and forestry.

Passage came after months of negotiations to merge the drastically different versions passed by the House and Senate earlier this year. While the last farm bill technically expired on October 1, many elements received funding through the end of the year.

The final version closely mirrors the Senate version and excludes contentious language in the House bill that was supported by Trump and would have added stricter work requirements for eligibility in the Supplemental Nutrition Assistance Program – commonly referred to as food stamps. Several controversial forestry changes in the House bill were also left out of the final version.

The bill offers more flexible coverage for struggling dairy farmers and invests $300 million in prevention and response for animal pests and disease. It also addresses issues such as access to broadband internet, and farm stress and mental health services, as well as the opioid epidemic in rural areas.

Negotiators also agreed to include legislation that would legalize industrial hemp, a significant development for producers of cannabidiol, or CBD oil.

The chairs of the House and Senate Agriculture committees – Rep. Mike Conaway, a Texas Republican, and Sen. Pat Roberts, a Kansas Republican – and the top Democrats on the committees – Rep. Collin Peterson of Minnesota and Sen. Debbie Stabenow of Michigan – were the key negotiators on the compromise bill.