Afghan special forces traded fire Sunday morning with the remaining gunmen who attacked the Intercontinental Hotel in Kabul hours earlier, Afghanistan's TOLO news channel reported.
The gunfire intensified about 4 a.m. Sunday (6:30 p.m. Saturday ET), TOLO said.
Ambulances came to the scene during a lull in the shooting, a witness who lives near the hotel told CNN.
Nasrat Rahimi, a deputy spokesman for the Ministry of Interior Affairs, earlier told CNN that Afghan special forces were trying to engage the attackers.
Two of four attackers in the hotel have been killed, Rahimi said. He said the hotel's third floor, where the kitchen is located, had caught fire.
TOLO reported that foreign troops were also at the hotel. Lotfullah Najafizada, the head of the broadcaster said on Twitter that the last attacker was on the hotel's top floor.
TOLO showed images of people apparently hanging off balconies, saying they were "desperate guests and staff trying to escape" from the burning hotel.
TOLO and Afghan station 1TV News later quoted an interior ministry spokesperson as saying five civilians had been killed and six injured in the attack,
One hundred people had been rescued from the hotel, 16 of them foreigners, both broadcasters said on Twitter citing the ministry. They said the operation to clear the hotel was ongoing.
The attackers had been in the kitchen, then moved to the fourth floor, an Afghan special forces commander told CNN.
Ambulance crews "are on the site, waiting for a green light to get in," Dr. Wahid Majrooh, the country's minister of public health, said earlier. TOLO reported some were able to take people from the hotel grounds.
The US State Department had warned this week of a possible attack in Kabul.
"Security Alert for #Kabul, #Afghanistan: reports that extremist groups may be planning an attack against hotels in Kabul, such as the Hotel Baron near Hamid Karzai Int'l Airport," the agency said Thursday on Twitter.
Foreigners are among the hotel guests, but it wasn't immediately known how many or their nationalities, Rahimi said.
Hotel was attacked in 2011
In June 2011, seven Taliban fighters attacked the same hotel over several hours. In the end, all seven, along with 11 other people, were dead.
The InterContinental Hotels Group developed the hotel, which opened in 1969. But the hotel has had no association with the group since the Soviet invasion in 1979, though it continues to use the name without connection to the international company.