LAHORE, Pakistan — The phone calls started last month, said Rana Iqbal Siraj: intimidating, anonymous demands that he defect from the party that governed Pakistan for the past five years and tried to curb the power of the military. Soon, he was summoned by state security officials who delivered the same message.

Mr. Siraj, a candidate for the legislature in Punjab Province, stayed with his party, the Pakistan Muslim League-Nawaz, which was built decades ago around former Prime Minister Nawaz Sharif. Then in June, roughly a month before Election Day, security officials raided his business at the behest of the military, Mr. Siraj said in an interview.

“They are trying to ruin me financially by raiding my warehouse and beating my staff,” he said, adding that he was considering moving his family abroad for their safety. “What am I at fault for? Just because I’m running on the PML-N ticket?”

Mr. Siraj and fellow party members said the aim of the raid was to weaken the former governing party’s chances by forcing its candidates to defect ahead of national elections on Wednesday that are shaping up to be a referendum on the military and its interference in Pakistan’s democracy.