The attack that lasted several hours involved four heavily armed attackers who were killed by the Afghan commando forces and police, the Ministry of Interior said in a statement.
The assault began at around 7:00pm last night and continued until Sunday noon.
The interior ministry quoting the spy agency, National Directorate of Security, said the attack was planned by the Haqqani Network.
The security forces rescued 160 guests including 31 foreigners from the hotel. Five people were killed and 10 others wounded in the attack, the ministry said.
The Taliban have claimed responsibility for the attack, the second major attack on the hotel since 2001.
Zabihullah Mujahid, Taliban’s spokesman, in an email said their five fighters launched the attack on the Intercontinental Hotel at around 10pm on Saturday night.
He claimed several foreign troops and guests suffered casualties in the during the attack that ended at 11am Sunday.
The Taliban said the hotel was hosting a gathering of Afghan and foreign officials when it was attacked.
At the time of the attack, officials from 34 provinces had gathered for a meeting organized by the Telecommunications Ministry.