COLUMBIA — South Carolina’s Senate passed a bill that would grant relief for farmers affected by October’s floods, setting up the chance of a veto showdown with Gov. Nikki Haley.

The bill, which sets aside $40 million for relief, would allow farmers to apply for a grant for up to $100,000 to pay for production expenses, such as seeds and fertilizer. The cash can’t be spent on debt or new farm equipment.

“We can’t afford to let our farms go under,” Senate President Pro Tempore Hugh Leatherman, R-Florence, said in a written statement. “I grew up on a farm and know the important role they play.”

Because the Senate made minor changes to the bill, the House still has to make a final vote before it heads to Haley’s desk for her signature. Haley vowed in March she would veto it, arguing farmers already get enough help and subsidies from the federal government.

“We’re going to keep cheering and supporting the farmers in every way that we can to help them get back on track,” Haley said. “I don’t think we should treat them any differently than we do everybody else.”

Despite Haley’s threat, both chambers passed the bill with a large majority, making a veto override by the General Assembly likely. A request for comment from Haley’s office was not immediately returned.

The flood caused more than $500 million in damages to the state’s agriculture, South Carolina’s largest industry. Of that amount, $376 million were in crop losses alone.

Gavin Jackson contributed to this report.

Reporter’s note: This article has been updated to reflect a correction in the grant application process.