ABUJA/MAIDUGURI (Reuters) - Hassan Ya'u, a 42-year-old maize and sesame seed farmer in Nigeria's northern Katsina state, was tending to his crops early this month when dozens of armed men on motorcycles rode towards his plot and started shooting at close range.

Ya'u and fellow farmer Musa Nasidi managed to escape, but at least 50 people - many of them farmers working their fields at the time - were killed in the attack in the latest in a series of deadly raids on farming areas. An unknown number of people were abducted in the assault, which was carried out in broad daylight.

Ya'u and Nasidi said the gunmen had attacked their Kankara farming community because farmers had not paid a levy imposed by the armed gang.

Such raids are forcing many farmers to leave their fields, contributing to higher food prices and soaring inflation as Nigeria faces the worst cost of living crisis in a generation.

"They set ablaze my produce and took away foodstuff worth about 4 million naira ($2,739.73)," said Ya'u, who has sought refuge in Daura town, nearly 200 km (124 miles) from Kankara.

"I don't have access to my farm because bandits have taken control of the area. Everything has been ruined," added the father of 13 children who faces an uncertain future.

Armed gangs demand as much as three million naira per village, depending on the size, to allow farmers to work.

"The farmers are even forming vigilante groups to make sure they are able to access the farms but it is still very difficult," said Kabir Ibrahim, president of All Farmers Association of Nigeria.

Northern Nigeria produces the bulk of the country's staples like rice, yam and maize, but it is also its most unstable region, as armed kidnapping gangs attack and pillage villages in the northwest while Islamist militants cause havoc in the northeast.

Nasidi, 36, fled to near Katsina town after the Kankara attack.

He used to harvest about 400 bags of groundnuts, 80 bags of sesame seed and 200 bags of maize, he said, but now faces a bleak year after part of his 8.5-hectare farm was set ablaze by bandits.

"The situation is beyond our control and I was left with no choice other than to leave Kankara because our lives were in danger," Nasidi told Reuters.

A World Food Programme report on the outlook for acute food insecurity globally said Nigeria has joined the world's "hunger hotspots", which analysts attribute to insecurity in farming areas and high costs of seed, fertiliser, chemicals and diesel.

Lagos-based consultancy SBM Intelligence said 1,356 farmers in Nigeria were killed since 2020. This year, 137 deaths had been recorded, it said, adding that farming was becoming a dangerous occupation.

"The risk is very grave," said Confidence McHarry, SBM's lead security analyst, adding that gunmen also attacked farmers "on suspicion of collaborating with the military."

Defence spokesperson Major General Edward Buba said that with the rainy season under way, the military was prioritising farmers' security.

"The farmers union are keying into the farm protection plan of the armed forces to make the best of the rainy season," he said, without elaborating.

But for 22-year-old farmer Abdulaziz Gora in Zamfara state, next to Katsina, there is little hope of returning to his farm. He relocated to state capital Gusau after a violent attack on his village in May, abandoning his soybean and maize crops.

"Anyone caught there risks being kidnapped or killed," he said.

($1 = 1,460.0000 naira)

(Reporting by Ope Adetayo in Abuja and Ahmed Kingimi in Maiduguri, Editing by MacDonald Dzirutwe and William Maclean)

By Ope Adetayo and Ahmed Kingimi