A bomb placed under a car exploded in Egypt's second city Alexandria on Saturday, killing two people including a policeman, two days before the country is due to hold a presidential election.
The bombing, which wounded four other policemen, targeted Alexandria's security chief, police Major General Mostafa al-Nemr, the interior ministry said.
There was no immediate claim of responsibility for the bombing. Islamic State released a video last month in which it warned Egyptians against taking part in the upcoming vote and urged Islamists to attack security forces and leaders.
State news agency MENA quoted Nemr as saying that two people, a policeman and a driver, were killed in the blast.
Photos on social media that Reuters could not independently verify showed a burnt out car and smoke at the site of the blast.
"On Saturday March 24 an explosive device planted underneath a car exploded ... as the Alexandria security chief drove by," the interior ministry said in a statement.
Eyewitnesses said police and military personnel formed a cordon around the site of the explosion. Local television stations later showed Nemr unharmed and inspecting the area.
Islamic State attempted to assassinate Egypt's defense and interior ministers in December during a trip the pair made to the Sinai Peninsula, where the hardline militant group has been waging an insurgency for almost five years.
President Abdel Fattah al-Sisi said on Friday that Islamic State militants would soon be defeated in the Sinai as he visited troops battling the jihadists there.
Polls will open on Monday when voters choose between Sisi and one little-known candidate who supports the former field marshal. All credible opponents dropped out in January, citing intimidation by the authorities after the main challenger was jailed.
Sisi's critics say he has cracked down harshly on dissent and that tough economic reforms have eroded his popularity. Supporters say such measures are needed to stabilize Egypt, which was rocked by years of unrest after protests toppled veteran leader Hosni Mubarak in 2011.
As military commander, Sisi led the ousting of Egypt's only competitively-elected leader, President Mohamed Mursi, a member of the Muslim Brotherhood, who was toppled amid demonstrations against his rule in 2013, a year after taking power. Sisi took office with a landslide election victory a year later.
State news agency MENA blamed the Brotherhood, which is now banned in Egypt and designated a terrorist group, for Saturday's bombing.
"This attempt comes in the context of terrorist Muslim Brotherhood elements trying to disrupt the electoral process and influence citizens into not going to the polls and participating in the presidential election," the agency said.
Islamic State and other militant groups have successfully assassinated officials in recent years. Islamic State bombed a hotel in Sinai in 2015 during a parliamentary election, killing seven people including two judges overseeing the vote.
Egypt's top public prosecutor, Hisham Barakat, was killed by a car bomb in June 2015.