The Al-Askari Mosque in Samarra contains the tombs of two revered Shi'ite imams, both descendants of the Prophet Muhammad.
National Security Adviser Mouwafak al-Rubaie said armed men broke inside the shrine and seized the guards, including police officers responsible for protecting the site. The gunmen planted the explosives and fled.
Following the blast, U.S. and Iraqi forces surrounded the shrine and began searching houses in the area.
Thousands of demonstrators gathered near the shrine vowing to punish those being responsible for the bombing.
Iraqi Prime Minister Ibrahim al-Ja'fari announced three days of national mourning following the attack.
His announcement came as the office of Iraq's top Shi'ite religious authority, Grand Ayatollah Ali al-Sistani, said he wants seven days of national mourning.
(compiled from agency reports)