LAHORE, Pakistan — For a while, the main question surrounding Maryam Nawaz Sharif was whether she might become Pakistan’s first female candidate for prime minister in a generation. Now it’s whether she might be going to jail.

Ms. Sharif, 44, leapfrogged several influential relatives to emerge in recent months, along with her uncle, as a possible long-term heir to the leadership of the country’s dominant political force: the Pakistan Muslim League, long headed by her father, Nawaz Sharif, a three-time prime minister. She has been known for years as one of her father’s closest advisers, but more recently she has taken a much more public role in the party’s leadership.

When Mr. Sharif was forced to resign from office over corruption charges in July, she became the family’s public face of defiance, harshly criticizing Pakistan’s unelected power players, the military and the judiciary. And in the weeks after, she helped organize her mother’s victory in the important by-election for Mr. Sharif’s vacated seat in Parliament.

But the same corruption case that helped bring her father down has dragged her into court, too — accusations about the purchase of luxurious London properties with offshore money, detailed in the Panama Papers leak. An accountability court opened criminal proceedings against her, her father and her husband this month that could end with them all barred from holding public office and imprisoned.