"We have confirmed five people killed including security guards", police officer Mohamed Abdulkadir said.
He said the vehicle rammed through a checkpoint and was fired on by security forces before it exploded outside the SYL hotel.
The hotel is situated close to the main entrance to the Villa Somalia government complex that includes the presidential palace, ministry buildings and residences.
"The blast was very huge but thanks to God the number of casualties is less than the devastation suggests," Abdulkadir said.
More From This Section
A witness described seeing a large blast and a thick plume of smoke that rose high into the air.
"I saw a car speeding towards the area and huge smoke and fire went up in the sky," said Elmi Ahmed.
An AFP journalist at the scene described widespread damage to buildings in the area. The blast left a crater in the road, nearby walls collapsed and debris scattered across the usually busy carriageway.
The Al-Qaeda aligned Shabaab jihadist group said it was responsible for the attack, saying the SYL hotel was targeted because it "is close to the presidential palace, and also home to apostates and unbelievers."
The claim could not immediately be verified but the Shabaab frequently exaggerates the impact of its attacks.
The fortified hotel, popular with government officials, business people and visiting diplomats and delegations, was previously attacked in both February this year and January last year.
The January 2015 attack killed at least five people when a suicide car bomber rammed the hotel gates on the eve of a visit by Turkey's President Recep Tayyip Erdogan.
In February this year 14 people were killed when twin blasts were triggered close to the hotel and the neighbouring Peace Garden on a busy Friday afternoon.
The group is expected to try and violently disrupt elections due to be held in September and October.
The jihadists have also staged repeated attacks in neighbouring Kenya and a recent security analysis warned the group was expanding its horizons with cells active in Djibouti, Ethiopia, Kenya, Tanzania and Uganda as well as Somalia.