WASHINGTON -- House Republicans on Thursday barely managed to pass farm legislation that could cost 35,000 New Jersey residents their food stamp benefits

Rep. Tom MacArthur, a Republican, was the only Garden State lawmaker voting yes.

The Agriculture and Nutrition Act passed, 213-211, after an attempt in May to approve farm programs for the next five years crashed and burned. Twenty Republicans, including four of the five from New Jersey, voted with every House Democrat against the measure. Rep. Donald Payne Jr., D-10th Dist., missed the vote due to illness.

MacArthur. R-3rd Dist., also was the only New Jersey representative to support the bill last month, which failed when 30 Republicans defected.

Both the New Jersey Farm Bureau and the New Jersey Agricultural Society supported the legislation, and MacArthur cited the provisions in the bill for farmers.

"The farm bill provides much needed help to our local farms here in South Jersey, most specifically by including specialty crop grants that will directly benefit local blueberry and cranberry farmers," he said.

House Speaker Paul Ryan, R-Wis., called it a "bold, transformative bill that will help people to move out of poverty and into lives of opportunity."

And President Donald Trump praised the measure on Twitter.

Farm Bill just passed in the House. So happy to see work requirements included. Big win for the farmers! — Donald J. Trump (@realDonaldTrump) June 21, 2018

The bill would impose new restrictions on those receiving food stamps, officially known as the Supplemental Nutrition Assistance Program, including work requirements and new rules on eligibility.

In addition, New Jersey and other states that have extended coverage to families whose income exceeds federal limits would no longer be allowed to do so. Instead of phasing out the benefits as incomes rise, such households automatically would lose their food stamps as soon as they exceeded the limit.

That could cost an estimated 10,000 New Jersey households, or 35,000 individuals, could lose their benefits, according to a study by the Center on Budget and Policy Priorities, a progressive research group in Washington.

"It's outrageous and immoral to cut programs that help feed our nation's children," said Rep. Donald Norcross, D-1st Dist. "It's clear we shouldn't be cutting SNAP benefits and should be raising wages so working men and women can buy groceries and feed their children."

A Senate version of the farm bill does not include the new food stamp requirements, which the CBPP estimated could take away benefits from almost 1 million Americans nationwide.

"Though the bill's proponents say they want to encourage work among more SNAP recipients, the bill is likely to leave many people who face substantial barriers to work with neither earnings nor food assistance.," said Robert Greenstein, president of the center.

MacArthur said a provision he authored would prevent cuts in food stamps to children even if their parents face reductions due to the bill's new work requirements.

"Children cannot go to school and learn on an empty stomach - and they should not have to come home and worry about where their next meal is going to come from," he said.

The House action followed passage of a Republican tax bill that gave 43 percent of its benefits to the top 5 percent of taxpayers, according to the Tax Policy Center, a research group of the progressive Urban Institute and the Brookings Institution and includes experts from Democratic and Republican administrations.

MacArthur has supported the House Republican leadership on several key and controversial issues.

He played a key role in the GOP effort to repeal the Affordable Care Act, which the Congressional Budget Office said would have left 23 million more Americans without insurance.

And he was the only New Jersey representative to vote for the tax bill, which capped the federal deduction for state and local taxes and was projected to raise taxes on a greater percentage of Garden State residents than those of any other state, according to the Tax Policy Center.

Those votes have helped make MacArthur vulnerable this fall. He is rated as just a slight favorite for re-election by the Cook Political Report, a Washington-based publication that tracks congressional races. He faces Andy Kim, a former national security official, in November.

Jonathan D. Salant may be reached at jsalant@njadvancemedia.com. Follow him on Twitter @JDSalant or on Facebook. Find NJ.com Politics on Facebook.