The Department of Foreign Affairs and Trade is urging all Australians in South Sudan to leave or take refuge to avoid the escalating violence there.

The Department of Foreign Affairs and Trade (DFAT) has confirmed there are a number of Australians still in South Sudan, where the threat of all-out civil war looms.

There are reports Australians are among 3000 foreigners trapped in a South Sudan city experiencing bouts of heavy machine gun fire.

The city of Bor is in one of the most violent areas of the week-long conflict in which more than 1000 people are thought to have been killed.

Witness accounts are emerging of house-to-house killings and massacres along ethnic lines.

The fighting is said to be between troops loyal to President Salva Kiir, of the majority Dinka tribe, and those loyal to his rival Riek Machar, a former vice president who was sacked in July and who is a member of the Nuer tribe.

A DFAT spokesperson told AAP on Tuesday that the security situation continued to be exceptionally volatile and the department recommended all Australians leave immediately.

“We are aware of a number of Australians who remain in South Sudan,” the spokesperson said, without elaborating.

DFAT recommends that any Australians who cannot safely leave take refuge indoors and make contact with the Australian High Commission in Nairobi (+254 204 277 100) or DFAT’s 24-hour consular emergency centre (+61 2 6261 3305).