MEDAN, Indonesia -- An Indonesian air force transport plane carrying military personnel and their families plowed into a residential neighborhood in the country's third-largest city of Medan shortly after takeoff on Tuesday, killing dozens.

An Indonesian air force spokesman says the death toll in the crash has risen to 74. Air force officials say there may have been more than 100 people on the plane.

Television footage showed the mangled wreckage of the C-130 Hercules, a crumpled burning car and a shattered building that local media said was recently built and contained a spa, shops and homes. Smoke billowed from the site and several thousand people milled nearby. Rescue teams scrambled over the rubble, searching for any survivors.

Firemen attempt to extinguish the fire surrounding the wreckage of an Indonesian military transport plane after it crashed in the North Sumatra city of Medan, Indonesia, June 30, 2015. Reuters

Earlier, Air force chief Air Marshall Agus Supriatna said there is unlikely to be any survivors.

Get Breaking News Delivered to Your Inbox

The plane's manifest showed there were 50 people on the flight from Medan to the remote Natuna island chain, according to North Sumatra police chief Eko Hadi Sutedjo, but the actual number might be higher.

Supriatna said there were 12 crew and more than 100 passengers on the plane before it reached Medan on Sumatra, one of Indonesia's main islands. It had traveled from the capital, Jakarta, and stopped at two locations before arriving at Medan. The air force is trying to determine how many people got off or boarded during that journey.

Many passengers were families of military personnel. Hitching rides on military planes to reach remote destinations is common in Indonesia, a sprawling archipelago that spans three time zones.

Indonesia has a patchy civil aviation safety record and its cash-strapped air force has also suffered a string of accidents. Between 2007 and 2009, the European Union barred Indonesian airlines from flying to Europe because of safety concerns.

The country's most recent civilian airline disaster was in December, when an AirAsia jet with 162 people on board crashed into the Java Sea en route from Surabaya to Singapore. There have been five fatal crashes involving air force planes since 2008, according to the Aviation Safety Network, which tracks aviation disasters.

The crash of the transport plane, which had been in service since 1964, occurred not long before midday and just two minutes after it took off from Soewondo air force base.

Supriatna, the air force chief, said the pilot told the control tower that the plane needed to turn back because of engine trouble.

"The plane crashed while it was turning right to return to the airport," he said.

Medan resident Fahmi Sembiring said he saw the gray Hercules flying very low as he was driving.

"Flames and black smoke were coming from the plane in the air," he said.

Sembiring said he stopped not far from the crash site and saw several people rescued by police, security guards and bystanders.

Another man, Janson Halomoan Sinagam, said several of his relatives were on the plane when it left Medan.

"We just want to know their fate," he told MetroTV, weeping. "But we have not yet received any information from the hospital."

The C-130 accident is the second time in 10 years that an airplane has crashed into a Medan neighborhood. In September 2005, a Mandala Airlines Boeing 737 crashed into a crowded residential community shortly after takeoff from Medan's Polonia airport, killing 143 people including 30 on the ground.

Medan, with about 3.4 million people, is the third most populous city in Indonesia after Jakarta and Surabaya.

On Twitter, President Joko "Jokowi" Widodo said he and his family extend "heartfelt condolences" to the families of victims.

After the emergency response is complete, the government will evaluate the age of air force planes and other important military equipment, he said.

Aviation analyst Gerry Soejatman said numerous nonfatal accidents involving air force planes this year are worrying and suggest there could be shortfalls in areas such as training.

Previously, the air force's safety record was marred by low flight hours and parts shortages that stemmed from a U.S. ban on defense sales to Indonesia, but that situation no longer applies with the lifting of those restrictions more than five years ago.