CAIRO — At least 257 people died when an Algerian military transport plane filled with soldiers and civilians crashed near the capital on Wednesday, Algeria’s Defense Ministry said, in the deadliest of numerous air accidents involving aircraft from the country in recent years.

The Russian-built Ilyushin Il-76 transporter slammed into a field shortly after takeoff from a military base in Boufarik, about 15 miles southwest of Algiers. The victims included 26 members of Western Sahara’s Polisario independence movement, an official in Algeria’s ruling FLN party said.

Scores of ambulances and emergency workers rushed to the crash site, where early video footage showed clouds of smoke billowing from an area near the runway.

Algerian television showed images of body bags lined up. Farouk Achour, a spokesman for Algeria’s civil protection agency, said that 300 emergency workers were at the scene. Some bodies pulled from the fire showed signs of “deep burns caused by the fuselage catching fire,” he told The Associated Press.

The cause of the crash was unclear and is under investigation, the Defense Ministry said in a statement.

The plane was headed to Bechar, in the southwest of the country, but was scheduled to stop in Tindouf, an area on Algeria’s border with the disputed territory of Western Sahara. Algeria is a longtime backer of Polisario, the group that has been fighting since 1973 for independence for Western Sahara, which is controlled by Morocco.

In 2014, an Algerian military transport plane carrying 78 military personnel and their families crashed into a mountain in the northeastern province of Oum El Bouaghi during bad weather. One person survived.

Six people died when an Algerian Air Force C-130 crashed into a hillside in France in November 2012.

Until Wednesday, the country’s deadliest accident was in July 2014, when an Air Algérie jetliner traveling from Burkina Faso to Algeria crashed in the desert in Mali, killing all 116 people on board, including 53 French citizens. A French investigation into the crash blamed pilot error.