An explosion in a port city south of Shanghai that killed two people and injured at least 30 others has been traced to a hole in the ground where a toilet had been, according to China's state television.

Key points: Blast knocked down buildings and left streets covered with debris

Blast knocked down buildings and left streets covered with debris Traced to hole where toilet was, but unclear if it was inside building

Traced to hole where toilet was, but unclear if it was inside building State TV says it was not a gas explosion

The early morning explosion struck a riverfront neighbourhood in Ningbo, one of China's busiest ports, knocking down buildings and leaving streets littered with damaged cars and debris.

The force of the blast shattered windows and punched holes in the walls of buildings as far as a kilometre away.

Firefighters have traced the blast to a hole in the ground where a toilet had been, the official Xinhua News Agency said.

However, it is unclear whether the explosion was inside a building and Xinhua said the cause was still being investigated.

The state broadcaster said it was not a gas explosion, without elaborating further.

Investigations into the cause of the blast are ongoing. ( Reuters )

The residential buildings knocked down by the blast were in the process of being demolished, local media reported.

The official People's Daily newspaper said there were no residents at the site of the explosion, though there might have been rubbish collectors at work during the time of the blast.

CCTV said two people were killed while two others who had been injured were in a serious condition.

Sixteen people have been admitted to hospital for treatment, the Ningbo government said on its Twitter-like Weibo microblog.

China suffers frequent deadly fires and industrial accidents, often blamed on negligence.

Official safety crackdowns have improved conditions in some areas, but many companies still cut corners. In 2015, an explosion traced to improperly stored chemicals killed at least 173 people in Tianjin, a port east of Beijing.

AP