ALGIERS (Reuters) - More than 250 people including Western Sahara refugees were killed when a military plane crashed near Algeria’s capital on Wednesday, state media said, with witnesses saying they saw a wing catch fire shortly after the plane took off.

Dozens of firefighters, rescue workers and military officials worked around the blackened fuselage of the aircraft, which had been ripped open near its wings.

Bits of mangled and smouldering debris were scattered across the field near Boufarik airport southwest of Algiers where people were searching for bodies among the rubble.

Earlier TV images showed flames and smoke billowing from the site of the crash, the country’s worst air disaster.

“This morning at around 8:00 an Ilyushin model military transport plane ... crashed directly after takeoff in an agricultural field that was clear of residents,” Major General Boualem Madi told state TV.

A line of white body bags could be seen on the ground next to the wreck of what media said was a Russian Ilyushin Il-76 transport plane, part of which was still intact. Smoke was still billowing hours after the crash.

“After taking off, with the plane at a height of 150 meters I saw the fire on its wing. The pilot avoided crashing on the road when he changed the flight path to the field,” Abd El Karim, a witness, told the private Ennahar TV station.

Another witness said: “We saw bodies burned. It is a real disaster”.

A total of 257 people were killed, most of them military, the defence ministry said. Ten crew and other people described as family members died, and a number of survivors were being treated at an army hospital, the ministry added.

Slideshow ( 7 images )

The plane had been heading to Tindouf on the border with Western Sahara, Algeria’s defence ministry said.

One young man cried as he spoke to a local TV station about a relative who died in the crash.

“We talked on the phone yesterday evening and he promised to call me again on arrival in Tindouf,” he said.

WESTERN SAHARA

A member of Algeria’s ruling FLN party told Ennahar the dead included 26 members of the Polisario Front, an Algerian-backed group fighting for the independence of neighbouring Western Sahara, a territory also claimed by Morocco in a long-running dispute.

A source close to Polisario said that the dead included four refugee children and that around 30 refugees who had received medical treatment in the capital had been killed in all.

Tindouf is home to tens of thousands of refugees from the Western Sahara standoff, and a source close to Polisario said the flight route is taken regularly by Western Saharan refugees.

The defence ministry said in a statement it would investigate the cause of the crash, and it expressed condolences to the families of the victims.

Slideshow ( 7 images )

President Abdelaziz Bouteflika ordered three days of mourning, while former colonial power France, the United States, Russia and other countries expressed their condolences, a statement said.

Doctors who have been on strike for months over their pay and work conditions resumed work to treat the survivors, residents said. Some 70 ambulances arrived at the scene after the crash, local media said.

The U.N. has long been trying to broker a settlement for Western Sahara, which has been contested since 1975 when Spanish colonial powers left. Despite Morocco’s claims, Polisario established its self-declared Sahrawi Arab Democratic Republic in part of the territory.

Previous major air accidents in Algeria include an Air Algerie flight that crashed in northern Mali in July 2014 carrying 116 passengers and crew, nearly half of them French, en route from Burkina Faso to Algeria.

In February that year, an Algerian Air Force Lockheed C-130 Hercules crashed in a mountainous area in eastern Algeria killing 77 passengers and leaving one survivor.

For a map of crash site: tmsnrt.rs/2qnJqNL