LIMA, Peru (AP) _ The leader of a pro-Cuban guerrilla group and at least 39 other suspected leftist rebels escaped early Monday from a maximum-security prison by crawling through a 660-foot tunnel, officials said.

Corrections department director Victor Miranda identified Victor Polay, head of the Tupac Amaru Revolutionary Movement, or MRTA, as among those who escaped the Miguel Castro prison on the northeastern outskirts of this capital.

Miranda said 39 male and nine female members of MRTA fled, while President Alan Garcia said 40 rebels escaped. The different figures could not immediately be reconciled.

The breakout occurred about 3 a.m. in a facility that is considered the country's highest security prison and houses hundreds of suspected communist rebels.

Government prosecutor Maria Astete said police found two submachine guns, a walkie-talkie and four booby-trap bombs in the block-and-a-half-long tunnel.

Ms. Astete also said five hooded gunmen held up a bank at midday in a northern suburb, killing a guard and making off with 45,000,000 Peruvian intis, about $450. She said police believed the five to be among the escapees.

Police captured Polay on Feb. 3, 1989, in the highland city of Huancayo, 120 miles east of Lima. His capture was considered a serious blow to the pro- Cuban MRTA, which began fighting Peru's elected government in 1984.

The Shining Path group that operates primarily in the Peruvian highlands is considered the largest and most dangerous of the two anti-government organizations fighting President Garcia.

Polay, 38, was facing terrorism charges and was to be sentenced within weeks after a highly publicized trial. The government prosecutor was recommending a 15-year sentence.

Before taking up arms, Polay was a student leader of the center-left Aprista Party in the late 1960s. He studied with Garcia, current leader of the Aprista Party, in Spain in the early 1970s.

The MRTA is believed to number about 1,000 combatants and operates mostly in Peru's northern and eastern jungles. It also carries out occasional bombings against banks, embassies, and government buildings in the capital.

Its most spectacular action to date was the assassination in January of former Defense Minister Gen. Enrique Lopez. Lopez was gunned down in broad daylight by three men near his office in a fashionable Lima suburb.

Speaking to reporters, Garcia blamed the prison guards, who he said shared responsibility for the breakout.

Garcia said that despite the dramatic escape the guerrillas were losing their fight against the government.

''I reiterate that terrorism in Peru is in retreat,'' Garcia said. ''They have had 10 years and have not achieved anything.''

Hugo Otero, adviser to Garcia, told The Associated Press the president canceled appointments for the day because of the breakout.

Officials did not say how the escape was engineered, but sources in the Interior ministry, who asked not to be named, said given the high number that escaped they may have gotten inside help.

Prison workers have been on strike for months demanding higher pay. Corrections department officials said striking workers had been replaced by temporary workers.

Police said they had closed off roads leading from the city and detained more than 2,000 people throughout the metropolitan area who were not carrying documents.

On May 14, a column of 300 MRTA rebels seized the northern jungle town of Saposoa, freeing 35 suspected guerrillas from the town's jail and robbing three banks.

The MRTA takes its name from an 18th century mestizo, or mixed blood revolutionary who led a peasant revolt against Spanish colonial rule in the Andes.

It is smaller and less radical than the Maoist Shining Path guerrilla group, which has been fighting since 1980. The government says more than 18,500 people have died in the decade of political violence, including police, soldiers, rebels, government officials and civilians.