Unknown assailants have thrown a grenade at a vehicle carrying paramilitary security officers in southern Pakistan killing four and wounding seven others, officials have said.

A police spokesman said late on Wednesday the attack took place as the vehicle approached the headquarters of paramilitary forces called the Rangers, in Karachi, Pakistan's largest city.

"It was a bomb blast, the target seems to be a van carrying soldiers," Karim Khan, a police official, told the AFP news agency.

A spokesman for the Rangers confirmed the casualties.

"Seven soldiers were wounded, four of them embraced martyrdom," he said, adding that the soldiers were returning from duty when the bomb went off.

"The death toll is four now," Seemi Jamali, a senior doctor, confirmed.

Police cordoned off the area and ambulances rushed the casualties to the state-run Jinnah Hospital.

Ahsanullah Ahsan, Pakistani Taliban spokesman, said his group claimed responsibility for the attack, adding they had targeted the Rangers for working against them.

Recent violence in Karachi and elsewhere has fuelled fears of instability as the country heads towards general elections in May.

The city of 18 million, which is Pakistan's business hub, last year saw around 2,000 people killed in violence linked to ethnic and political tensions,  its deadliest toll in two decades.

Source: Agencies