(CNN) At least 27 people were killed when two car bombs detonated outside a hotel near Somalia's presidential palace in Mogadishu on Saturday, according to Security Minister Mohamed Abukar Islow. The blasts occurred two weeks after the deadliest car bombings in the nation's modern history.

The first blast, outside the Nasa Hablod Two Hotel, near the Villa Somalia presidential palace, was followed by a second blast in the same area moments later, according to police Capt. Osman Mohamed.

The bombings were followed by a firefight, with at least three armed militants inside the hotel, police said.

Two attackers were killed and three others were in custody Sunday, Abdulaziz Ali Ibrahim, a spokesman with the security ministry told CNN.

A car bomb attack in Mogadishu, Somalia, on Saturday left at least 10 dead, police said.

The victims included former member of the Somali Parliament Abdinasir Garane, southwest region minister Madoobe Nuunow and a police official, according to Mohamed and Major Ahmed Ibrahim.

More than 40 others were wounded, Ibrahim said.

The gunfight erupted after the bombings, with at least three militants armed with AK-47s and machine guns holed up in the hotel, Ibrahim said.

Footage from the scene showed piles of rubble, and cars turned into a heap of mangled metal.

At least ten people were killed in suicide car bomb attack near Somalia's presidential palace.

Terror group Al-Shabaab claimed responsibility in a statement posted on a pro-Al-Shabaab website.

On October 14, at least 277 people were killed in a double car bombing in Mogadishu, Somalia's Ministry of Information said.

About 300 people were wounded, including 40 people with injuries so severe they had to be airlifted to Turkey for treatment.

People gather near burned vehicles a day after a truck bomb exploded in the center of Mogadishu on October 15.

The first blast destroyed the popular Safari Hotel in the heart of the city.

Footage from the scene showed damaged buildings and a burning truck at the first blast site. A large white building had collapsed into a pile of rubble and other structures appeared blackened and destroyed.

Qatar's Embassy was also damaged, according to a statement from its Ministry of Foreign Affairs. The embassy's charge d'affaires suffered minor injuries, the statement said.

Hundreds of people were killed in double car bomb blasts in the Somali capital of Mogadishu on Saturday, October 14, 2017, an official said. A Somali soldier helps a civilian who was wounded in a blast. Shaken residents called it the most powerful explosion they'd heard in years. A Somali man reacts after seeing a body and destroyed buildings. The initial explosion destroyed dozens of stalls and a popular hotel in the heart of the city. Minutes after the first blast, a second vehicle bomb went off nearby. A large building collapsed into a pile of rubble near the site of the first explosion. Somali soldiers patrol what had been a busy intersection. People gather near burnt vehicles a day after the explosions. Somalis help an injured person. Hospitals struggled to cope with the high number of casualties, security and medical sources said. Somali soldiers patrol the area, but there had been no claims of responsibility by Sunday night. Security forces were tipped off about the first vehicle carrying explosives and were pursuing it when the explosion happened, a police official said.

Minutes after the first blast, a second vehicle bomb went off in the nearby Madina district.

Security forces had been tipped off about the vehicle carrying explosives and were pursuing it in the busy K5 district of the city when the explosion happened, said Col. Ahmed Hassan of the Mogadishu police.

Mogadishu, a large city on the east African nation's coast, has endured high levels of violence for years. Al-Shabaab, an al Qaeda-linked terror group, has carried out several deadly car bomb attacks in the city.

Somalis also face the threat of starvation.

The country is in the midst of a severe drought, and 3.1 million people are threatened by famine because of the food shortages and violence, according to reports from the United Nations this year.