At least 28 people have been killed in gang violence in northern Nigeria, police and local residents said on Friday, in the latest unrest causing security concerns for the government.Twenty-six people lost their lives on Thursday evening when gunmen on motorcycles attacked gold miners in the Anka district of Zamfara state.In a separate attack also on Thursday, two police officers on patrol were shot dead and six people were kidnapped in the Birnin Gwari area of neighbouring Kaduna state.Meanwhile there were reports that up to 25 people may have been killed in clashes between farmers and nomadic cattle herders in Taraba state but police did not confirm the death toll.Nigeria, West Africa's largest economy, is battling an array of security threats across the country, from Boko Haram jihadists in the northeast to oil militants in the south. Troops have been deployed in many states to combat criminal gangs involved in kidnapping and cattle rustling, as well to try to contain violent clashes between herdsmen and farmers. Shoot on sight In the first attack, the chairperson of the Anka local government district, Mustapha Gado Anka, told AFP: "We buried 26 people killed in the two attacks by the armed bandits."The victims were miners from Kuru-Kuru that were attacked and residents of Jarkuka village who had come to help their neighbours." The assailants ambushed the volunteers from Jarkuka who had come to help, he added. Zamfara state police spokesperson Mohammed Shehu confirmed the attack, which are the latest against farming communities in the state.Last month, gunmen on motorbikes killed at least 36 people in nearby Bawar-Daji as they attended a funeral for victims of a previous attack. Rural communities in the agrarian state have been under siege from gangs of cattle rustlers who carry out deadly raids on herding communities to kill, loot and burn homes. In the absence of a robust police force and effective judicial system in Nigeria, villagers have created local vigilante groups to fight off the gangs. But the vigilantes are equally responsible for the bloodshed and are also accused of extra-judicial killings.Residents said the intensification of the attacks was because locals were cooperating with soldiers sent to quell the attacks.In early April, the Nigerian air force deployed special forces to the state to reinforce troops on the ground fighting the bandits. Following the Bawar-Daji attack, state governor Abdulaziz Yari ordered troops to shoot on sight anyone found with a gun in the area. Cattle rustling gangs In Kaduna, state police spokesperson Mukhtar Aliyu said: "We lost two policemen in armed bandits attack on our men on patrol in Birnin Gwari area yesterday (Thursday)."The gunmen also kidnapped six members of the Birnin Gwari branch of the National Union of Road Transport Workers (NURTW) who were returning from Zamfara state where they attended a wedding."The six men were stopped by the gunmen near Dan Fall village from where they herded them into the bush and allowed their driver to go."The Kaduna state NURTW chairperson, Alhassan Haruna, said the attackers were "obviously part of the kidnapping and cattle rustling gangs that terrorise Birnin Gwari district"."We know they are looking for ransom but they are yet to make contact with us," he added.Meanwhile in Taraba, which has seen repeated clashes between herders and farmers, state police confirmed an attack on Jandeikyula in the Wukari district.But they could not confirm local reports that up to 25 people may have been killed."I can't give a figure of casualties at the moment but definitely we have some people who lost their lives in the course of the attack," said spokesperson David Misal."Military operatives have been deployed to the affected communities to restore order. Our men are still on the field gathering information," Misal said.* Sign up to News24's top Africa news in your inbox: SUBSCRIBE TO THE HELLO AFRICA NEWSLETTERFOLLOW News24 Africa on Twitter and Facebook.