Burkina Faso's transitional parliament has passed a law banning homosexuality with offenders facing up to five years in prison.

The Persons and Family Code law, making Burkina Faso the latest in a series of African countries to criminalise lesbian, gay, bisexual and transgender activity, also tightens rules on nationality and stateless people.

The military that took over Burkina Faso in a 2022 coup has grown increasingly intolerant of dissent amid worsening Islamist militant violence in the West African country.

The legislation was passed unanimously by the unelected, 71-member transitional parliament on Monday and is awaiting the signature of military junta leader Ibrahim Traore.

'The law provides for a prison sentence ranging from two to five years and a fine,' Justice Minister Edasso Rodrigue Bayala said on state television on Monday night.