A cow on a livestock farm in Waynesboro, GeorgiaMarina Hutchinson / AP

At least one saga of congressional bickering came closer to an end Monday night, when negotiators finally released the details of the 2018 farm bill, a massive piece of legislation, generally renewed every five years, that governs the United States’ agriculture and nutrition policy. This year’s bill skirts many of the most contentious points of debate that had held up its passage: It does not include either the new work requirements for the Supplemental Nutrition Assistance Program (SNAP, also known as food stamps) or the restructuring of conservation and forestry programs for which House Republicans had been pushing.

The House could vote on the bill as soon as tomorrow, and the Senate could follow before the end of the week. President Donald Trump told reporters at the White House Tuesday that “the farm bill is in very good shape,” seeming to signal that he will sign the legislation if and when it arrives on his desk.

That would bring to an end months of publicly aired fighting between the House and the Senate Agriculture Committees. The chambers’ versions of the bill started miles apart. The House’s was so stringently partisan that it took two tries to even get it through the Republican-controlled chamber. In contrast, the Senate’s bill was solidly bipartisan from the start. “Frankly, it’s a damn miracle we got it done given all the controversy,” Representative Collin Peterson of Minnesota, the Democratic ranking member of the House Agriculture Committee, told the Red River Farm Network earlier this week. At the end of the day, the final piece of legislation is similar to the Senate bill and bears little resemblance to the cost-slashing, program-restructuring bill proposed by the House.

Representative Mike Conaway of Texas, the chair of the House Agriculture Committee, said on Tuesday that rural America is struggling with economic uncertainty, and “the farm bill is a piece of lessening that problem.” Though his caucus did not get everything—or even most—of what it hoped to achieve in the bill, he is pushing for its passage.

The most expensive component of every farm bill—and perennially the most controversial—is the SNAP program, which makes up about 80 percent of the bill’s total spending. Implementing increased regulations on the food-stamp program, including new work and categorical eligibility requirements, has been on conservative Republicans’ agenda for years, though studies have shown that these proposals would have made food stamps less accessible to food-insecure Americans. Before the midterm elections, House Republicans, including Conaway, Trump, and Vice President Mike Pence, had said they would “stand firm” and hold out for a bill that included more stringent work requirements. That outcome was always unlikely: Senator Pat Roberts of Kansas, the Republican chair of the Senate’s agriculture committee, said from the beginning that a bill with increased work requirements would never pass the upper chamber.

But House Republicans, many of them in tight reelection campaigns in their home districts, wouldn’t budge on the requirements before the midterms. That disagreement, and others, postponed passage of a new bill until after November 8. Once Democrats won the chamber, it became clear that jamming new work requirements into the bill would be a losing battle and, if the bill rolled over into the new legislative session, a Democrat-controlled House would likely negotiate a farm bill even less in line with the House GOP’s priorities.

While work requirements aren’t in the bill, nutrition advocates can’t breathe easy just yet: Agriculture Secretary Sonny Perdue has been making the rounds among GOP members of Congress, trying to sweeten the farm-bill deal by saying that the USDA will soon issue a new rule cracking down on SNAP recipients who currently have waivers exempting them from the work requirements.

SNAP wasn’t the only major difference between the House’s and Senate’s initial versions. Disagreements over conservation and forestry programs also contributed to the delay in a final bill, with two conservation programs in the crosshairs: the Conservation Stewardship Program, which House Republicans wanted to phase out, and the Environmental Quality Incentives Program, with which they hoped to replace it. CSP makes annual payments to farmers who have taken comprehensive, farm-operation-level steps to conserve natural resources such as water, soil, and air. EQIP works one-on-one with farmers to encourage more targeted conservation practices, such as cover crops and environmentally friendly grazing plans, and helps farmers secure grants to fund these changes. Conaway and Senator Debbie Stabenow, the Democratic ranking member of the Senate’s agriculture committee, had been at loggerheads over the preservation of CSP.

Both programs incentivize farmers to implement environmentally friendly practices, but CSP has a longer-term focus that makes it a more effective weapon against climate change, says Juli Obudzinski, the policy director at the National Sustainable Agriculture Coalition. EQIP is a shorter-term program. “I think given the political climate, we did all right in terms of escaping from what could have been a much more grim scenario for conservation funding,” she says. The final bill is largely a compromise between the House’s and the Senate’s versions. For now, CSP will lose $800 million a year in funding, much of which will be funneled into EQIP and other conservation programs, but will remain in place for the next five years.

Despite losing most of the battles it took up, the House GOP did clinch one major victory for its caucus: stymieing bipartisan efforts to crack down on commodity subsidy payments and instead expanding eligibility for these subsidies.

Programs like commodities subsidies—which are meant to help farmers manage the fluctuations inherent in the agricultural economy while maintaining steady crop production—have been a recurring point of debate in the farm bill since their first iteration in the 1930s. Critics of the current implementation of commodity subsidies, led by Republican Senator Chuck Grassley, charge that the subsidies are often exploited through a loophole that allows multiple people classified as “active managers” on the same family farm to claim the $125,000-a-year subsidy. Ninety-nine percent of farms in the United States are classified as family farms, according to the USDA. The Senate bill would have lowered the income ceiling under which farmers are eligible to receive the payments; Grassley hoped to go even further and cap the number of managers per farm who are eligible to receive subsidies.

But the final bill includes neither of these amendments. Instead, it will move forward with a House provision that expands the definition of a “family farm” to include cousins, nieces, and nephews—making them eligible to receive subsidies as well. Conaway argues that this is a step toward remedying the epidemic of aging farmers. Andrew Walmsley, the director of congressional relations for the American Farm Bureau Federation, says that more restrictions on commodities subsidies would “further complicate farm operations and management by imposing unnecessary and burdensome restrictions on farms. It would threaten their vitality at a time when real farm profitability and income is at decade-low levels.” But others aren’t so sure.

“It’s about program integrity, and where are taxpayer dollars going, and what types of operations are they supporting?” says Obudzinski of NSAC, which advocates on behalf of small farmers. “Frankly, there’s limited funding in each farm bill … We certainly do think that money could be spent better elsewhere.” Proponents of a free-market agricultural economy have also been critical of expanding these subsidies. The Heritage Foundation’s Daren Bakst wrote that the bill “would make the out-of-control subsidy system worse … it would expand the loophole allowing subsidies to go to people who by any reasonable definition are not farmers.”

The 807-page piece of legislation has a slew of other new or tweaked provisions. Senate Majority Leader Mitch McConnell’s pet project, the legalization of growing hemp, is in the final bill, as are reinforced protection programs for struggling dairy farmers. Grant programs targeting new farmers and farmers of color will be expanded. Amid a trade war that continues to hurt American farmers’ export markets, the $867 billion bill establishes $500 million in funding to build out foreign markets for American crops. It also requires the White House to nominate someone to fill the position of Undersecretary for Rural Development, which Perdue had proposed eliminating as part of his dramatic restructuring of the USDA.

While the release of the conference report and bill text is a major step for the farm bill, it’s not done yet. Members on both sides of the aisle are hoping to push the legislation through to Trump’s desk by the end of the week, to avoid it getting caught in the budget negotiations that are expected to be Congress’s priority next week as it tries to stave off a government shutdown.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.