AGDAM, AZERBAIJAN, FEB. 27 -- Officials of the main mosque in this town just east of the embattled enclave of Nagorno-Karabakh said they buried 27 bodies today, brought from an Azerbaijani town inside the enclave that was captured Wednesday by Armenian militiamen.

Refugees fleeing the fighting in Khojaly, a town of 6,000 northeast of the enclave's capital, Stepanakert, claimed that up to 500 people, including women and children, were killed in the attack. No independent estimate of the deaths was available here. The Agdam mosque's director, Said Sadikov Muan, said refugees from Khojaly had registered the names of 477 victims with his mosque since Wednesday.

Officials in Baku, the capital of Azerbaijan, estimated the deaths in Khojaly at 100, while Armenian officials in their capital, Yerevan, said only two Azerbaijanis were killed in the attack. An official from Baku said here that his government fears Azerbaijanis would turn against it if they knew how many had been killed.

Of seven bodies seen here today, two were children and three were women, one shot through the chest at what appeared to be close range. Another 120 refugees being treated at Agdam's hospital include many with multiple stab wounds.

The Armenians who attacked Khojaly Tuesday night "were shooting, shooting, shooting," said Raisa Aslanova, who reached Agdam Wednesday night. She said her husband and a son-in-law were killed and her daughter was missing.

Armenian officials in Yerevan said Azerbaijani soldiers, backed by tanks and several helicopters, launched an attack this morning on Askeran, an Armenian-populated town just inside Nagorno-Karabakh on the road between Khojaly and Agdam.

A cease-fire negotiated Wednesday night by visiting Iranian Foreign Minister Ali Akbar Velayati never took effect. Velayati called off a planned visit today to Nagorno-Karabakh and headed instead for Yerevan.

More than 1,000 persons have been killed in four years of fighting touched off by Armenian demands that predominantly Armenian Nagorno-Karabakh, an enclave surrounded and controlled by Azerbaijan, should become part of Armenia.

Among the refugees who fled here over the mountains from Nagorno-Karabakh were two Turkmen soldiers from former Soviet Interior Ministry forces who had taken refuge in Khojaly after deserting from their unit last Friday because, they said, Armenian non-commissioned officers had beaten them "for being Muslims."

The two deserters claimed their former unit, the 366th Division, was supporting the Armenian militiamen who captured Khojaly. They said they tried to help women and children escape. "We were bringing a group through the mountains when the Armenians found us and opened fire," said Agamehmet Mutif, one of the deserters. "Twelve were killed."