A bill to exempt dairy and hog farms from North Dakota’s anti-corporate farming law has been approved in the North Dakota Senate by a 27-18 vote.

The bill, was opposed by all 14 Democrats in the Senate, as well as four Republicans. The legislation will now go to North Dakota’s House of Representatives for another vote.

Sen. Terry Wanzek, R-Jamestown, a farmer and the bill’s lead sponsor, said the “small exemption” would be similar to laws in Minnesota and South Dakota, which have seen dairy production grow as North Dakota’s has dropped by more than 40 percent since 2002, the Grand Forks Herald reported.

Wanzek said few family farmers want to take on the financial risk and labor demands of starting a dairy without assistance, and the main barrier is lack of access to equity capital that corporations could provide.

North Dakota is one of nine states with anti-corporate farming laws and the only state without a livestock exemption, supporters said.

“Both these industries need our support before they’re lost altogether in North Dakota,” said Sen. Joe Miller, R-Park River, chairman of the Senate Agriculture Committee, which had voted 4-2 along party lines to recommend the bill’s passage.

The North Dakota Farmers Union, the state’s largest farmer-member organization, is among those opposing the bill. Individual farmers also testified against it, raising concerns it could force them to compete with outside investors for land.

At the request of Sen. Tim Flakoll, R-Fargo, senators voted separately on the dairy and swine exemptions, passing both before approving the bill as a whole.