A cargo plane that was reportedly overloaded has crashed along the banks of the River Nile after taking off from the South Sudan capital, killing at least 25 people.

Parts of the plane were scattered in a bushy area on banks of the Nile with a few homes nearby.

Bashir Yashin, who saw the plane come down, said it seemed as though initially the plane might crash into a market area before the pilot apparently diverted it.

Apparently all of those killed were on the plane, local residents said, after it crashed into a swampy, muddy farm plot in Juba. Onlookers quickly gathered near the site, about a mile from Juba's international airport. After the crash, planes were still taking off and landing at the airport.

Presidential spokesman Ateny Wek Ateny said the plane was bound for the Paloich oil fields in Upper Nile state. Rebels and government forces have been battling for control of the state, but Juba, the capital, has been peaceful recently.

The Russian-made Antonov plane crashed shortly after taking off, Mr Ateny said.

An unnamed source at the Russian aviation agency said the plane appeared to have been overloaded.

It is common for the security services to put family members on cargo planes to Paloich even if they are not on the manifest, according to Kenyi Galla, assistant operations manager for Combined Air Services, a company that operates chartered flights across South Sudan. The flight was not chartered by his company, Mr Galla said..

"Normally (this flight) used to carry 12 people, but the problem is they added more people," he said. "This plane is just for cargo, not for passengers."