Nawaz Sharif, who has been prime minister of Pakistan three times, was disqualified from office in July

Pakistan’s former prime minister would escape a corruption trial and be allowed to live in exile under a potential deal being brokered by Saudi Arabia.

Nawaz Sharif is expected to visit Saudi Arabia as the kingdom appears ready to intervene in the stand-off between the head of Pakistan’s longest ruling political dynasty and the military establishment.

Mr Sharif, who requires permission to leave Pakistan, is ready to quit active politics, without facing prosecution, according to a source. However, he has been forced to change his preferred line of political succession, naming his brother Shehbaz Sharif as heir to his Pakistan Muslim League-Nawaz party, Pakistan’s largest, in place of his daughter, a foe of the military.

Mr Sharif, who has been prime minister three times, was