Two suspected terrorists blew themselves up as police were closing and another suspect was shot dead in Morocco.
A bloody pair of legs were seen lying in the middle of a road after one of the blasts in Casablanca, Morocco's largest city. Police covered up the legs, shorn off at the knees, with pieces of cardboard. Broken glass and charred debris littered the street.
The explosions, weeks after the bombing of a Casablanca Internet cafe, promised to further rattle the North African kingdom whose first high-profile brush with Islamic terrorism came in five suicide bombings in the city in May 2003.
Moroccan authorities responded to those attacks, which left 45 people dead, with the arrest of thousands of alleged Islamic militants some accused of working with al-Qaida to plot strikes in Morocco and abroad.
Parliamentary elections are scheduled in September. The opposition Justice and Development Party, an Islamic group, is expected to win the most votes.
Tuesday's violence started with a police raid on an apartment where the suspected terrorists were holed up in the working-class Hay Farah neighborhood of Casablanca.
When officers burst in, one of them fled to the roof, where he blew himself up, said a police official on the scene who refused to give his name, saying he was not authorized to do so. Morocco's official MAP news agency identified the bomber as Mohamed Rachidi.
A second man was on the verge of detonating explosives he also was carrying when police shot him, officials said. He later died of his wounds. He was identified by police as Mohamed Mentala. Mentala was carrying 4 kilograms (nearly 9 pounds) of explosives, an Interior Ministry spokesman said.
Mentala and Rachidi had both been sought by police for alleged involvement in the 2003 suicide bombings in Casablanca, said the Interior Ministry official, who asked not to be named, citing ministry policy.
A third suspect fled, and he blew himself up in the afternoon as police were searching the neighborhood for him, according to another officer at the scene, who also refused to give his name. The officer said police were also hunting for a fourth suspect, who was believed to be hiding in buildings nearby.
MAP said the afternoon blast seriously injured a police officer and slightly injured another. It said that the bomber had not yet been identified. Police had cordoned off the area, and an ambulance with sirens wailing quickly arrived at the scene.
The suspects were allegedly linked to the March 11 bombing of an Internet cafe in Casablanca _ an attack that killed the bomber and four others. Police investigations into that blast led them to a wider suspected plot to attack the city's port, police stations and tourist sites in Morocco.
In that blast, bomber Abdelfettah Raydi detonated his charge when the cyber cafe's owner caught him surfing jihadist Web sites.
Authorities say the subsequent investigation uncovered a larger plot that involved at least 30 people. The group had amassed dozens of kilograms (pounds) of homemade explosives in a Casablanca apartment.
Police have so far arrested 31 suspects, who have been questioned by judges in preliminary court hearings. Raydi and many other suspects were among some 2,000 arrested after the 2003 bombings, but were later released from prison under a royal pardon.
Moroccan authorities have said they do not believe Raydi's group had links to international terrorist networks.