At least two people killed and dozens of guests rescued after attack by armed men on luxury complex on city's outskirts.

At least two people have been killed after an attack on a popular tourist resort on the outskirts of Mali's capital, Bamako, according to officials, but dozens of guests were rescued.

Armed men stormed the luxury Le Campement Kangaba complex near Dougourakoro on Sunday, attacking a resort frequented by top officials and foreign residents, especially during the weekend.

Malian troops and soldiers from France's Bakhane counterterrorist force headed to the scene. Local residents reported hearing shots fired while smoke billowed into the air.

Mali's Security Minister Salif Traore said late on Sunday that at least four attackers were killed by security forces.

"We have recovered the bodies of two attackers who were killed," Traore told journalists, adding that they were "searching for the bodies of two others", without specifying if any more were on the run.

"At first we thought they were armed bandits but we know how armed bandits operate. They don't hold territory, so now we think it is a terrorist attack," Traore had earlier told reporters outside the entrance to the resort, part of which was on fire.

There was no immediate claim of responsibility.

Officials said two people had been killed, including a French-Gabonese citizen and another whose nationality was not yet known.

Two others had been wounded, one civilian and a policeman, Baba Cisse, spokesman for the security ministry, told the Reuters news agency. An attacker had also been wounded and fled, leaving a sub-machine-gun and six bottles of explosives behind, he said.

Malian state TV reported that 36 guests had so far been rescued. At least 14 people, both Malians and foreigners, were wounded, according to the security ministry.

A witness told local television ORTM he saw a man arrive on a motorcycle who "started shooting at the crowd" followed by "two or three people" who came in another vehicle.

Witness Boubacar Sangare was just outside the compound during the attack. "Westerners were fleeing the encampment while two plainclothes police exchanged fire with the assailants," he told Reuters.

A security ministry official said government troops "have sealed off the area and are in the process of organising operations" against the attackers.

French President Emmanuel Macron pledged "full support" to Mali's leader in a phone call after the attack, Macron's office said on Monday.

Andrea de Georgio, a freelance journalist in Bamako, said the resort is about 10km outside the capital.

He said that the attack seemed to be "well-organised".

"The attackers are hidden inside the camp, and the camp is very big so there are a lot of places where they can hide," de Georgio said.

Security threats

The west African country has been battling armed rebellion for several years, with fighters roaming the north and centre of Mali.

The US embassy in Bamako had warned earlier this month "of a possible increased threat of attacks against Western diplomatic missions, places of worship, and other locations in Bamako where Westerners frequent".

In November 2015, gunmen took guests and staff hostage at the luxury Radisson Blu hotel in Bamako in a siege that left at least 20 people dead, including 14 foreigners.

That attack was claimed by al-Qaeda's North African affiliate, the al-Qaeda in the Islamic Maghreb (AQIM) group.

A state of emergency has been renewed several times since the Radisson Blu attack, most recently in April when it was extended for six months.

The United Nations has a 12,000-strong force in Mali known as MINUSMA, which began operations in 2013.

It has been targeted constantly by armed fighters, with dozens of peacekeepers killed, including five on Saturday.