Update: On Friday, July 13, Nawaz Sharif and Maryam Nawaz Sharif were arrested at Lahore’s airport.

Two weeks before its general elections on July 25, Pakistan is bracing for another political storm. On Friday, an anticorruption court sentenced former Prime Minister Nawaz Sharif to 10 years in prison in a case arising after the Panama Papers leaks revealed that Mr. Sharif’s family owned four undeclared apartments in London. The court also sentenced Maryam Nawaz Sharif, his daughter and political heir, to seven years in prison.

The conviction and impending arrest of Mr. Sharif and his daughter is expected to turn the electoral season fraught and potentially impact the results, if Mr. Sharif’s Pakistan Muslim League-Nawaz, also known as P.M.L.N., goes to the polls without its star campaigners.

The court acquitted Mr. Sharif of the charges that he had acquired the apartments by corrupt, dishonest or illegal means but convicted him for his failure to explain how he came to own the properties, as he and his family have been living in them since the early 1990s. Mr. Sharif was in London with his wife, who is battling cancer, when he was convicted.

Mr. Sharif and his daughter have announced their decision to return to Pakistan on Friday. They would face immediate arrest and imprisonment. The former prime minister and his daughter have repeatedly claimed their innocence and attributed their travails to a falling out with the military over his attempts to assert civilian supremacy.