Image copyright Reuters Image caption Afghan security forces have taken up positions around the hotel

At least four gunmen have launched an attack on Kabul's Intercontinental Hotel, Afghan officials say.

Special forces killed two of the attackers, an interior ministry spokesman said, and are trying to get to the others.

The gunmen stormed the hotel on Saturday evening, shooting at guests and detonating grenades.

At least five people have been injured, officials said. It is not clear how many have been killed.

The attack began at about 21:00 local time (16:30 GMT), with reports suggesting the gunmen shot at security guards as they made their way into the five-storey building.

They targeted staff and guests before special forces were called in.

Security forces then cleared the ground floor of the luxury hotel but the attackers are still on the floors above, spokesman Nasrat Rahimi told the BBC.

Some reports said the hotel had been hosting an IT conference attended by provincial officials at the time. One witness told Reuters news agency that the attackers had taken hostages.

The attack comes just days after the US embassy in Kabul issued a warning about hotels in the city.

"We are aware of reports that extremist groups may be planning an attack against hotels in Kabul," the embassy wrote in a public security alert published Thursday, though it highlighted another hotel near the international airport as a possible target.

"These groups may also be targeting public gatherings/demonstrations, government facilities, transportation, markets, and places where foreigners are known to congregate."

Image copyright Reuters Image caption File photo: The Intercontinental Hotel, photographed in January 2016

A guest at the hotel told AFP news agency that people were hiding in their rooms.

"I don't know if the attackers are inside the hotel but I can hear gunfire," the guest said.

"I beg the security forces to rescue us as soon as possible before they reach and kill us."

Another interior ministry spokesman told AFP an investigation had already begun into how the attackers had breached security, which was handed over to a private company two weeks ago.

"They probably used a back door in the kitchen to enter," he said.

The Intercontinental is a state-owned hotel which often hosts weddings, conferences and political gatherings.

It was attacked by the Taliban in 2011. Twenty-one people were killed including nine attackers.

Security has been tightened in Kabul since last May, when a huge truck bomb killed at least 150 people.

However, there have been several attacks in recent months. They include a bomb at a Shia cultural centre last month that killed more than 40 people.