LAHORE, Pakistan (Reuters) - Pakistanis began casting votes on Sunday for the parliamentary seat vacated by ousted Prime Minister Nawaz Sharif, in a by-election seen as a test of support for the Sharif dynasty ahead of the 2018 general election.

Slideshow ( 2 images )

Sharif’s ruling Pakistan Muslim League-Nawaz (PML-N) party hopes a resounding victory in the eastern city of Lahore would show that support for the family was undiminished despite the Supreme Court’s removal of Sharif in July.

Sharif’s daughter Maryam has spearheaded the PML-N campaign for her mother Kulsoom - who is the MPL-N candidate despite receiving cancer treatment in London with Nawaz at her side.

Maryam, who some PML-N leaders see as a future leader, has framed the poll as a chance for voters to give a bloody nose to the judiciary by handing the party a thumping victory.

“Will you take revenge for your disrespected vote?” Maryam asked supporters at a recent rally.

Opposition leader Imran Khan - whose threats of street protests pushed the Supreme Court to launch a probe into Nawaz’s wealth - is seeking to build on the success of his anti-graft crusade by making inroads into Sharifs’ power base in Punjab.

The Supreme Court in July disqualified Sharif because he did not declare a monthly salary, equivalent to $2,722, from a company owned by his son when the veteran leader, who had held power twice in the 1990s, became prime minister for the third time. Sharif denies receiving the salary.

Khan has turned the by-election into a plebiscite about corruption, and has accused the provincial Punjab government, which is run by Nawaz’s brother Shahbaz, of abusing state resources to help the PML-N campaign.

“Your prime minister owns some of the most expensive real estate in the world - all in his daughter’s name. Meanwhile half the children of this country are malnourished,” Khan told a rally on Saturday.

Analysts predict PML-N will win again but they say Khan’s party would build momentum ahead of the 2018 poll if PTI candidate Yasmin Rashid, a gynecologist from the area, substantially reduces the PML-N’s 40,000 vote-winning margin from 2013.

“PTI would be very happy if the margin ended up being small. That would be a victory for them,” said Hasan Askri a political analyst.

Many of the 321,633 registered voters in the central Lahore NA-120 consituency are conflicted.

“My head goes towards PTI while my heart goes towards PML-N,” said Ali Raza, 25, a bank employee.

Kulsoom and Rashid will be competing against about 40 other candidates, including religious parties. One candidate is backed by a new party that is led by an Islamist firebrand who is subject to a $10 million bounty offered by the United States.

Hafiz Saeed heads the Jammat-ud-Dawa (JuD) charity, having founded and formerly led the Lashkhar-e-Taiba (LeT) militant group that carried out the 2008 attacks on the Indian city of Mumbai that killed 166 people. The United States has placed Saeed, the charity and LeT on a terrorist list. (L4N1LV52I)

Voting began at 9am (0400 GMT) and the polls are due to close at 5pm, with results likely to be announced after midnight.