Peru's President Alberto Fujimori yesterday confirmed that the hostages had a few minutes" warning that an attack by security forces on the Japanese ambassador's residence was imminent.
Some of the members of the armed forces held hostage were advised "so they could have some preparation", Mr Fujimori said at a press conference. He declined to say how the message had been passed.
A reporter for the opposition Caretas magazine said military officers who were among the hostages learned details of the assault through letters written in code. The signal for the start of the operation was to be a marine anthem played by a band at nearby headquarters. Residents nearby heard the anthem shortly before the attack.
Mr Maximo Rivera, who was replaced as head of Peru's anti terrorism police during his 126 days as a hostage, refused to say whether the captives knew the action was coming. "There are civilians who don't understand this type of thing," he told local radio.
All of the 72 hostages were on the second floor of the residence when the attack was launched, while most of the guerrillas were on the first floor playing soccer.
The Tupac Amaru (MRTA) rebels vowed revenge, but political analysts said the highly successful raid by government troops dealt a devastating blow to the already moribund guerrilla group and gave the president a huge political boost.
Mr Fujimori tried not to appear overconfident despite euphoria at the ending of Latin America's longest hostage siege.
"It could be that it (terrorism) is not defeated. There are still some, but Peru cannot give in to terrorists' blackmail and Peru should show the international community that terrorism has no impact," he told reporters early yesterday.
The Marxist MRTA, whose chief, Mr Nestor Cerpa Cattolini, was killed in Tuesday's surprise military assault, vowed not to give up its revolutionary war. Its international spokesman, Mr Isaac Velazco, issued a stream of militant statements, denying the MRTA was dead and saying the guerrillas would retaliate by attacking military and economic targets in Peru.
"There are enough of us to continue the revolutionary war of the people for the creation of a just society, and to win," he said at a rally by about 30 MRTA sympathisers outside the Peruvian consulate in Hamburg, Germany.
The MRTA's storming of the diplomatic compound on December 17th last year was the most daring strike in 17 years of violence in Peru. The rebellion has cost more than 30,000 lives and £15.6 billion in infrastructure damage.
But the deaths of the 14 strong band who carried out the attack ended foiled the MRT's plan to achieve a mass release of jailed comrades and left the group with 200 fighters hiding in the jungle.
Tuesday's operation by 140 commandos brought citizens on to the streets to wave flags, cheer and honk car horns. Congressmen rose to cheer "Long Live Peru!" during a rollcall in parliament.
One captive - a supreme court judge - two soldiers and all 14 guerrillas, including two women, died in the assault. Judge Carlos Giusti Acuna, was wounded and died after a heart attack.
Troops swarmed into the compound over walls from private houses an burst into the building from tunnels in an eruption of gunfire and explosions. Some tossed smoke bombs and grenades, while others fired sniper shots the smoke using laserguided rifles.
Months of spying with microphones and infrared sensors gave security forces a precise image of the inside of the residence.
The Bolivian ambassador, Mr Jorge Gumucio, said 10 of the rebels, most of whom were teenagers trained in Peru's remote eastern jungle zone, were playing soccer in a large reception room when the troops stormed in.