Twelve civilians were killed on Thursday during a jihadist attack in the north of Burkina Faso, which has been battling a wave of Islamist violence, officials said on Friday.The west African country declared a state of emergency in several provinces at the end of last year and on Thursday replaced its army chief as it struggled to put a stop to a spate of such attacks. In the latest violence, gunmen attacked a village market in broad daylight, the security ministry said in a statement issued late on Friday."Around 30 armed individuals perpetrated... a terrorist attack in the village of Gasseliki," it said, giving a toll of 12 dead and two wounded."A barn, a cart and six shops were also set alight," it added.A local source told AFP that the attackers "ransacked stores and opened fire on people who had gathered for the weekly market".Jihadist attacks began in northern Burkina Faso in 2015 but then spread to the east, near the border with Togo and Benin.The country is part of the vast Sahel region and one of the poorest states in the world.The region turned into a hotbed of violent extremism and lawlessness after chaos engulfed Libya in 2011, which was followed by an Islamist insurgency in northern Mali and the rise of Boko Haram in northern Nigeria.Most attacks in Burkina Faso itself have been attributed to the jihadist group Ansarul Islam, which emerged near the Mali border in December 2016, and to the JNIM (the Group to Support Islam and Muslims), which has sworn allegiance to Al-Qaeda in the Islamic Maghreb.Ansarul Islam emerged as violence spilled over from Mali, where radical Islamists seized key Sahara towns in 2012 before being ousted by French troops.Smaller groups are also active, with the overall number of fighters estimated to be in the hundreds, according to security sources.The groups are believed to be responsible for more than 270 deaths since 2015. The capital Ouagadougou has been hit three times and almost 60 people have died there.The jihadists extend their hold gradually, forcing government workers and others who oppose them to flee. The violence has so far displaced some 40 000 people.In the north, armed groups move freely through the country's porous borders.The jihadists mainly target the security forces, but also attack government officials and local chiefs who oppose them.Teachers are vulnerable due to the jihadists' fierce opposition to secular, French education, with their threats and attacks sparking the closure of hundreds of schools in the north and the east.As the country struggles to get on top of the violence, army chief Major General Oumarou Sadou was replaced on Thursday by General Moise Minoungou, according to a presidential decree read on public television.Sign up to News24's top Africa news in your inbox: SUBSCRIBE TO THE HELLO AFRICA NEWSLETTERFOLLOW News24 Africa on Twitter and Facebook.