It was carrying members of Algerian air force and their families.
A local farmer described the moment he saw people leaping from the aircraft moments before the plane crashed at 7.50am local time on Wednesday.
Firefighters and civil security officer at the scene of a fatal military plane crash, today, at Boufarik military airbase, near the Algerian capital, Algiers.
At least 181 killed in the crash of a military aircraft in Algeria.
Shocked onlookers told Algerian television network Ennahar they saw flames coming from the plane's engines before take off, ABC reported.
Turkish President Recep Tayyip Erdogan expressed his condolences to the President of Algeria Abdelaziz Bouteflika over the heavy loss of human life in the crash of a military transport plane near Boufarik airdrome.
The veteran leader also ordered that a special prayer be said for the victims after weekly Muslim prayers on Friday, a decree published by state press agency APS said.
In the south, the Algerian-backed Polisario Front seeking independence for Western Sahara ordered a week of mourning for the 30 dead Sahrawi people from its refugee camps in Tindouf, a statement from the group said.
Smoke could be seen billowing into the sky from afar.
Passengers from Western Sahara, a disputed territory annexed by Morocco after Spain withdrew in 1975, were among the fatalities.
Around 100 military personnel were on board the Ilyushin Il-76 transport plane, a military source told AFP, asking not to be named.
The plane crash has been confirmed by the Defense Ministry as the worst air disaster in the history of Algeria, killing all 257 people on board including 10 crew members.
The Araban-language Algerian TV Dzair said five people were in a critical state but it was unclear if they had been inside the plane.
According to the plane manufacturer's website, the IL-76, a four-engine plane built in the Soviet Union and then Russian Federation, can transport between 126 and 225 passengers depending on the model and configuration.
In 2014, more than 70 off-duty military personnel and their family members were killed when a C-130 plane crashed into the Djebel Fertas mountain shortly before it was to land in the northern city of Constantine.