Pakistan's Supreme Court has ruled there is insufficient evidence of corruption to remove Nawaz Sharif from the role of prime minister.
It instead ordered a further investigation into money transfers.
Questions arose over the business dealings of Sharif's family when three of his children were linked to offshore accounts in the Panama Papers leaks in 2015.
Sharif and his family have denied any wrongdoing.
They have dismissed the claims as politically motivated.
The case has made headlines in recent months amid predictions it could determine the future of PM Sharif.
About 1,500 police officers were deployed around the court in Islamabad. Protesters nearby urged Sharif to step down with shouts of "Go Nawaz, Go Nawaz", Reuters reports.
Stocks rose following the highly anticipated decision on Thursday.
The Supreme Court agreed to investigate Sharif's offshore wealth late last year after opposition leader Imran Khan threatened street protests.
The focus of the probe was on the funds used to purchase property in London using offshore companies.
Sharif's daughter Maryam, tipped as a future political star, and his sons Hasan and Hussein are implicated in the allegations.
Sharif said the wealth was acquired legally. But his critics had suggested offshore companies were used to launder illegally-obtained wealth or avoid taxes.
The Supreme Court's five-member bench was split on Thursday, with two judges voting against the prime minister but three choosing instead to order a further probe.
Sharif's party, the Pakistan Muslim League - Nawaz [PML-N], hailed the decision and his daughter Maryam tweeted: "Praise and glory be to Allah alone."
Source: News Agencies, Edited by website team