Ousted Pakistani Prime Minister Nawaz Sharif gestures as he boards a Lahore-bound flight due for departure, at Abu Dhabi International Airport, UAE July 13, 2018. REUTERS/Drazen Gorgic

LAHORE, Pakistan (Reuters) - Ousted Pakistani Prime Minister Nawaz Sharif and his daughter Maryam returned to the country on Friday to face lengthy prison sentences in a high-stakes gamble to galvanize their beleaguered party ahead of a July 25 election.

The flight carrying the Sharifs landed in the central city of Lahore just before 9 p.m. (1600 GMT) as security forces were stationed around the city to prevent mass demonstrations by their political supporters.

The Sharifs’ return could shake up an election race increasingly marred by accusations Pakistan’s powerful military is working behind the scenes to skew the contest in favor of ex-cricket hero Imran Khan, who describes Sharif as a “criminal” who deserves no support.