The attack, in which four people died, demonstrates that, despite the harsh police methods deployed over the past months, the round-ups of thousands of suspects and the hanging of at least 15 men convicted of plotting to overthrow the government by force, the Islamic extremists can still mobilise sufficient resources to strike at the heart of the state.
Security sources said that the attackers first exploded a bomb by remote control in Cairo's Sheikh Rihan street near the entrance to the Interior Ministry, forcing the minister's car and the car of his bodyguards to stop. They then raked the stationary vehicles with bullets.
Later, state television showed the minister in hospital after recovering consciousness from an emergency operation. He was lying on his back, his ear bandaged and his right arm in plaster, and spoke in a hoarse voice.
Mr Alfi, 57, was appointed in April to head Egypt's huge internal security apparatus after his predecessor, Abdel-Halim Moussa, revealed publicly that he had met Muslim scholars trying to mediate between the government and the militants.
But Mr Alfi's four months in office have seen some of the most dramatic events in the last year and a half of political violence which has killed more than 175 people and injured 300.
Four nail bombs, which militants denied planting, killed 16 people and injured 60 in May and June. The government, determined to show no mercy, hanged 15 militants in June and July.
The militants have organised a long series of attempts to kill senior police officers and government officials, almost always hitting them when they are at their most vulnerable - in their cars on the street.
In April, Muslim militants ambushed the car of the Information Minister, Sawfat Sharif, as he left home, wounding him in the hand.
Last month, gunmen ambushed an army general's car in Cairo, hoping he was the general in charge of the military courts that condemned their comrades to death. Earlier this month, gunmen shot dead the deputy police chief of Qena province as his car waited at a level crossing.
The holder of the interior ministry has long been a top target for militants. In May 1987, gunmen shot and wounded former interior minister Hassan Abu Pasha, who had led a crackdown on militants. Mr Pasha visited Mr Alfi in hospital yesterday.
In December 1989, the then interior minister, Zaki Badr, narrowly escaped death when a pick-up truck packed with explosives blew up near his car.
Gunmen killed parliament's speaker, Rifaat Maghoub, and five others in October 1990. On Saturday, an Egyptian court acquitted 24 Muslim militants of his murder. Maghoub was the most important Egyptian official to be assassinated since militants shot dead President Anwar Sadat at a military parade in 1981.
(Photograph omitted)Reuse content