A bomb has ripped through a hospital in south-western Pakistan, killing at least 45 people and wounding dozens more.

The blast occurred at a hospital in the city of Quetta, the capital of Baluchistan province on Monday, a local official said.

The explosion targeted mourners who had gathered to accompany the body of Bilal Anwar Kasi, a prominent lawyer, who was shot and killed in the city earlier on Monday, an eyewitness claimed.

As many as 50 mourners - mostly lawyers and journalists - were entering the emergency department of the hospital when the bomb went off, a journalist at the scene told Reuters.

Television footage from the site showed scenes of chaos, with panicked mourners fleeing through debris as smoke filled the corridors of the emergency ward.

The motive behind the attack was unclear and no group has yet claimed responsibility.

Targeted killings have become increasingly common in Quetta with the province of Baluchistan increasingly plagued by violence.

The increased bloodshed is linked to a separatist insurgency as well as sectarian tensions and rising crime.