(Recasts)

PERM, Russia, Sept 14 (Reuters) - Engine failure caused an Aeroflot Boeing 737-500 plane crash in Russia on Sunday which killed all 88 people on board, officials said, dismissing fears terrorists had attacked the airliner.

The dead included 21 foreign nationals flying on the plane from Moscow to Perm in the Urals when it plunged into scrubland and railway on the edge of the city, narrowly missing houses.

Russian news agencies and television quoted eyewitnesses who said they saw an explosion before the plane fell to earth and wreckage was spread over a wide area fuelling speculation of a terrorist attack.

But Russian officials investigating the crash said a faulty engine had forced the plane to crash.

“We have no information that the aircraft exploded in mid-air,” Interfax news agency quoted Russia’s transport minister Igor Levitin as saying.

Alexander Bastrykin from the Russian Prosecutor-General’s office investigating the crash blamed it on a technical fault, according to RIA Novosti news agency.

“Judging by inspections from the scene . . . the aircraft crash was connected to technical defects of the right engine,” he said.

Fragments of debris covered a section of the Trans-Siberian railway, forcing trains to divert around the Perm area.

Television showed fire fighters walking around the smouldering remains. One of the only recognisable pieces of the aircraft was a white fuselage panel showing the logo of Aeroflot, Russia’s national carrier.

“There were 88 people on board, 82 passengers and six crew,” said Emergencies Ministry spokeswoman Irina Andrianova.

“All of them died. There were no casualties on the ground.”

Seven children were killed in the crash and Aeroflot said 21 foreign nationals were among the dead -- nine from Azerbaijan, five from Ukraine and one person each from France, Switzerland, Latvia, the United States, Germany, Turkey and Italy.

Russian news agencies said one of the dead was General Gennady Troshev, who in 2000 commanded the Russian army against separatist rebels in the north Caucasus region of Chechnya.

Russian aviation has tried to shake off its patchy safety record. Sunday’s incident was its worst crash since 170 people died in Aug. 2006 when a TU-154 plane crashed in Ukraine on a flight from the Black Sea resort of Anapa to St Petersburg.

Four years ago two Chechen suicide bombers blew up two Russian passenger planes within minutes of each other.

CONTACT LOST

Contact with the airliner was lost when it was at an altitude of 1,100 metres (3,600 ft) while descending to land, said an Aeroflot spokeswoman.

Russian President Dmitry Medvedev and Russian Prime Minister Vladimir Putin sent condolences to the Perm regional governor.

“The government commission will make every effort to investigate the aviation crash fully in order to help the families of the dead,” RIA news agency quoted Putin as saying.

Aeroflot, a debt-ridden airline in the 1990s when it had a fleet of mainly Soviet-built planes, has transformed itself into an image conscious, profit-making company with global ambitions.

Aeroflot immediately said it would pay compensation of 2 million roubles ($77,800) to relatives of the dead and made plans to fly family members from Moscow to Perm.

The last Aeroflot plane crash occurred in March 1994 in Siberia when 70 people were killed. Investigators found that the pilot’s teenage son had been allowed to enter the flight cabin and had accidentally switched off the autopilot.

Last month, at least 65 people were killed when a Boeing 737-200 crashed in Kyrgyzstan, a Central Asian country that was once part of the Soviet Union.