ALBANY, N.Y. — Farmworkers joined by Albany Bishop Edward Scharfenberger and other supporters rallied Wednesday outside New York’s Capitol for legislation to guarantee them overtime pay while removing the state’s ban on joining a union.

Some had marched for more than two weeks from Long Island to Albany, saying they need the same legal protections as other workers. The legislation would guarantee them at least one day off weekly, require overtime at 1.5 times their hourly wage after an eight-hour day or 40-hour week and make them eligible for unemployment compensation and workers’ compensation.

“I’m not here about the politics,” Scharfenberger told more than 100 people gathered in the park under bright sunshine. “This is a moral issue.”

Members of Catholic Charities of the Albany Diocese, led by Scharfenberger, several Democratic state lawmakers and unionists joined the rally.

“I know how hard it is,” said Librada Paz, a former farmworker who made the walk with her 4-year-old son Axel Rodriguez. “There are so many workers who struggle.”

Heriberto Gonzalez, 26, who walked the 200 miles, said others think overtime is most important, though he thinks it’s the ability for workers to organize, which presents a way to address any issues that come up.

He works on a vegetable farm in Orange County from February through November. He said during some harvests, such as strawberries, he works from 7 a.m. to 7 p.m. daily. When he lived on the farm, he often worked more than 75 hours a week, seven days a week, he said.

About 10,000 of the state’s 35,500 farms hire farmworkers and are required to pay New York’s $9 minimum wage.

The New York Farm Bureau said additional costs of overtime during short, weather-driven seasons and union restrictions would hurt already struggling farms.

“The farmworker labor bill ignores the unique nature of work on a farm,” spokesman Steve Ammerman said. He noted that Farm Credit East’s Northeast Dairy Farm Summary found that the average dairy farm made only $5,236 dollars in net earnings in 2015 because of low milk prices, with no better outlook for this year.

While the New York constitution guarantees workers the right to unionize, state law excludes its 60,000 agricultural workers. Gov. Andrew Cuomo and Attorney General Eric Schneiderman have said they agree with a New York Civil Liberties lawsuit challenging that law.

Cuomo also backs the pending legislation, spokesman Richard Azzopardi said.

Sen. Adriano Espaillat, a Bronx Democrat, said the legislation has 29 sponsors and needs 32 for a majority in the Republican-controlled Senate. “I call on Gov. Cuomo. He has the political muscle to get us three votes,” he said.

Assemblywoman Catherine Nolan, a Queens Democrat, said the Democrat-controlled Assembly will pass the bill again in what has been a 20-year fight. “It’s frustrating,” she said.