Burkina Faso's parliament has approved legislation allowing the military to use civilian volunteers in the fight against armed groups.

Legislators in the West African nation on Thursday allowed the "understaffed" military to arm civilians, a move that underscores how outnumbered the country's soldiers are amid rising attacks.

More:

Defence Minister Cherif Sy said the civilian recruits will undergo two weeks of training. He said the volunteers must be 18 years old and will undergo a "moral investigation" before being allowed to serve.

"It is not a question of making cannon fodder," he said. "We want to prevent these volunteers from becoming militias."

Burkina Faso's military has struggled to contain the spread of violent attacks despite training and assistance from France and the United States.

It has also been criticised for committing abuses during its crackdown on suspected fighters.

Corinne Dufka, West Africa director for Human Rights Watch (HRW), said on Thursday the government has failed to investigate a pattern of alleged killings by its own security services.

"This new plan to subcontract security operations to civilians threatens to lead to even more abuses."

The rights group last year said more than 150 men - mostly ethnic Peuhl herdsmen - were killed by Burkinabe security forces after being accused of supporting armed groups.

Continuing attacks

The government on Tuesday declared two days of national mourning following an attack on two villages, in which at least 36 civilians were killed, in the latest violence to rock the country.

The incidents prompted hundreds of people to flee the area and take refuge in the city of Kaya, residents told the AFP news agency.

Burkina Faso, as well as neighbouring Mali and Niger, has seen frequent attacks by armed groups since the start of 2015 when violence began to spread across the Sahel region.

According to the United Nations, some 4,000 people were killed in attacks in the three countries last year.