LIMA, Peru (AP) _ Amid gunfire and explosions, Peruvian forces stormed the rebel-held Japanese ambassador's residence Tuesday and pulled dozens of hostages to safety. Jubilant soldiers ripped the rebels' flag from the compound roof.

Local news media estimated that at least 30 of the 72 hostages had been taken out of the compound. Peruvian Foreign Minister Francisco Tudela, one of the hostages, was carried out on a stretcher.

Local radio reported that Japanese Ambassador Morihita Aoki, also a hostage, was wounded and taken to a hospital. It did not say how serious his injuries were.

Local reports said at least three soldiers were wounded. Soldiers were seen carrying several wounded comrades away on stretchers.

A large pool of blood, perhaps six feet wide, could be seen at the bottom of the stairway where soldiers led hostages down to freedom.

There was no sign of the estimated 15 Tupac Amaru rebels who seized the compound 126 days ago.

Occasional explosions continued for about a half hour.

To celebrate its victory, the military began playing martial music through loudspeakers set up outside the residence. Soldiers cheered and punched their fists in the air.

President Alberto Fujimori went to the compound within an hour of the raid.

Smoke billowed from the roof of the compound, which the members of the Tupac Amaru rebel movement stormed during a Dec. 17 cocktail party to mark the Japanese emperor's birthday.

The assault was carried out by Peruvian troops, who poured into the compound through the front gate. For weeks, the diplomatic residence has been guarded only by police. It was not immediately clear when the troops moved into position for the assault, or what triggered their attack.

A huge explosion rocked the building at 3:39 p.m. (4:39 p.m. EDT) and smoke poured out from the compound. Ambulances rushed to the scene, and a police helicopter was in the air.

A local television station reported that as many as 80 soldiers had entered the compound.

The leftist rebels seized almost 500 hostages on Dec. 17. Most hostages were released over the next few days. But the rebels continued to hold 72 men to press the government to release hundreds of their jailed comrades.

The government refused to release any jailed rebels, and direct negotiations to end the standoff peacefully broke down on March 12.

The hostage crisis had sparked a political crisis in Peru as well, and Peru's interior minister and national police chief stepped down over the weekend to accept blame for security lapses that allowed the takeover.

Interior Minister Juan Briones, an army general, said when he resigned that he and police commander Lt. Gen. Antonio Ketin Vidal were assuming political responsibility for the hostage crisis.

The pair was replaced by hard-line army generals Cesar Saucedo and Fernando Dianderas, who were named interior minister and national police chief, respectively.

Roman Catholic Archbishop Juan Luis Cipriani, one of the mediators in the crisis, met Monday with Fujimori. Later, he said the standoff was causing suffering on all sides, from the families of the hostages to the families of the rebels.