By Asad Hashim

ISLAMABAD (Reuters) - Pakistani police have arrested 30 workers from the opposition Pakistan Tehreek-e-Insaf (PTI) party ahead of planned protests to shut down the capital on Wednesday, a PTI official said on Saturday, as the party canceled a rally in the capital.

On Friday, supporters of PTI leader Imran Khan, a former Pakistani cricket hero, clashed with police in Rawalpindi, 20 km (12 miles) from Islamabad, and Khan accused the government of placing him under virtual house arrest.

Police on Thursday arrested 38 PTI workers at a youth rally, hours after local authorities imposed a two-month ban on all public gatherings in Islamabad and Rawalpindi.

The police and local authorities did not respond to requests for comment.

Khan has vowed to 'lock down' Islamabad on Wednesday in a bid to force Prime Minister Nawaz Sharif to resign over allegations of corruption linked to the Panama Papers leaks. Police say they will block any such attempt.

Chaudhry Rizwan, a senior PTI official for Islamabad, said 30 people were arrested overnight from outside Khan's home, where some supporters slept.

A Reuters reporter saw more than 100 police officers, some in riot gear, posted near Khan's residence.

"Today's rally has been canceled. For now, whatever will happen will be at Khan's Bani Gala residence," added Rizwan.

PTI's rally on Saturday was scheduled to act as a prelude for Wednesday's attempt to lock down Islamabad.

There were about 80 PTI supporters near Khan's road, vowing to protect their leader and demanding that Sharif stand down.

"I came here because I think of Pakistan, and things are very bad here. There is too much corruption here," said Dost Muhammad, 30, a tailor from Swat region who camped outside Khan's home overnight.

Khan's latest challenge to Sharif's government is based on leaked documents from the Panama-based Mossack Fonseca law firm that appear to show that his daughter and two sons owned offshore holding companies registered in the British Virgin Islands. Sharif's family denies wrongdoing.

Holding offshore companies is not illegal in Pakistan, but Khan has implied the money was gained by corruption. Khan admitted in May that he used an offshore company himself to legally avoid paying British tax on a London property sale.

(Writing by Drazen Jorgic; Editing by Stephen Powell)