MOGADISHU, Somalia - An explosion Friday in the home of Somalia's interior minister killed him and a woman suspected of being a bomber, as violent demonstrations swept the capital.

Security guards and soldiers opened fire on stone-throwing protesters angry at an agreement calling for the ouster of Somalia's popular prime minister, killing two people, an official and witnesses said.

Interior Minister Abdishakur Sheik Hassan, who also was minister for national security, died after shrapnel hit his legs and other parts of his body, said Ministry of Information spokesman Abdifatah Abdinur. The body of the female suspected bomber was found in the home, he said.

Mohamud Abdullahi Weheliye, a parliament member and relative of Hassan's, said the minister's niece carried out the attack and was "sent" by al-Shabab, an Islamist militia with ties to al-Qaeda. The group has carried out suicide bombings in the past, including ones that targeted government officials. There was no immediate official confirmation of Weheliye's account.

The two-story, gated building is normally well-protected. The explosion reportedly took place in the sitting room.

President Sheik Sharif Sheik Ahmed sent his condolences to the minister's family and the nation at large during an address on state radio.

Hassan "sacrificed his blood for the nation of Somalia," the president said.

The commander of the African Union peacekeepers, Maj. Gen. Nathan Mugisha, lauded the minister's commitment to the cause of peace in Somalia. "He was a driving force in much of the good reform and progress that we have seen recently," he said.

For a country swept by war and anarchy for two decades, Friday was particularly bloody. The violence came barely two days after President Ahmed and the parliament speaker signed an internationally mediated agreement extending the government's term by a year and postponing an August presidential election until 2012.

In the aftermath of that agreement, things took a turn for the worse in the nation.

Protesters blocked roads with rocks and burned tires, while chanting, "Stay put, Farmajo." Farmajo is Prime Minister Mohamed Abdullahi Mohamed's nickname. They also burned pictures of the U.N. envoy to Somalia, whom they accused of pushing forward the agreement.

Security guards opened fire on protesters, killing a teenage boy, after demonstrators threw stones at a hotel where lawmakers were staying, a military official said. A witness said soldiers shot a fellow soldier who joined the demonstration.

Demonstrators said they would keep protesting until they were assured that Mohamed would not have to leave office.