Tens of thousands of farmers rallied near India's capital on Sunday, vowing to remain defiant against the government over controversial agriculture laws they say will destroy their livelihoods.

Farmers shout slogans as they climb atop a tractor during the protest in Muzaffarnagar
Farmers shout slogans as they climb atop a tractor during the protest in Muzaffarnagar AFP / Money SHARMA

Chanting "farmer, labourer, unity!", the men and women wore yellow and green scarves signifying harvest and mustard fields while waving national and farmer union flags in Uttar Pradesh state's Muzaffarnagar district.

The farmers have been camped out on the borders of Delhi since late November in one of the biggest challenges to Prime Minister Narendra Modi's government.

The farmers have been camped out on the borders of Delhi since late November
The farmers have been camped out on the borders of Delhi since late November AFP / Narinder NANU

Farmers and union leaders reaffirmed at the gathering that they would fight for their rights and continue their sit-in along major highways into Delhi until the legislation is revoked.

They also called for a nationwide strike on September 27 to protest against the laws.

Farmers and union leaders said they would fight for their rights and continue their sit-in
Farmers and union leaders said they would fight for their rights and continue their sit-in AFP / Narinder NANU

"It's like the whole city and the roads are full of farmers," lawyer and farmer's son Amit Chaudhary told AFP from the gathering.

"Farmers are not the sort of people to be tired. We work day and night, irrespective of rains or harsh sun. We won't go back till the laws are taken back," he added.

Farmers and supporters representing various unions shout slogans as they attend the rally
Farmers and supporters representing various unions shout slogans as they attend the rally AFP / Money SHARMA

An AFP photographer at the site said at least 50,000 farmers and supporters took part.

An umbrella body representing farmer unions said people from 15 states were there.

Modi's government says the industry is massively inefficient and in need of reform.

But protesters fear the laws deregulating the sector will leave them at the mercy of big corporations.

Several rounds of negotiations between the government and ministers have failed to resolve the stand-off.

About two-thirds of India's 1.3 billion population draw their livelihood from farming and the sector has long been a political minefield.

The massive gathering comes ahead of crucial polls next year in India's most populous state Uttar Pradesh, home to 200 million people and governed by Modi's Bharatiya Janata Party.

The farmer agitation took a violent turn in January when a tractor rally transformed into a rampage in Delhi that left one farmer dead and hundreds of police officers injured.