Pakistan's Ambassador to the World Trade Organisation (WTO) Dr Tauqir Shah on Tuesday offered his resignation after the chief justice questioned the grounds of his appointment and his closeness to Shahbaz Sharif.
Shah will, however, represent the country at a WTO conference and then stay on for a month's time in order to wind things up.
Chief Justice (CJ) Mian Saqib Nisar had taken suo motu notice of Shah's appointment in April, when news of an extension granted to him had surfaced.
Shah was formerly the principal secretary of Punjab Chief Minister Shahbaz Sharif but was removed after the 2014 Model Town incident, in which he was accused but not indicted.
He was subsequently appointed Pakistan's ambassador to the WTO for a three-year term. The former government was planning to extend his term by another three years, but the CJ had directed the assembly not to issue a notification and summoned Shah to Pakistan instead.
In today's hearing, Justice Nisar noted that Shah's appointment had not been made on merit but due to his closeness to Sharif. The CJ further noted Shah was sent abroad as an ambassador after he was accused for the Model Town incident in which 14 people lost their lives.
When the attorney general (AG) argued that Shah's appointment was "for the benefit of Pakistan", the chief justice asked him "which Pakistan" he was talking about.
"Are the likes of Ali Jahangir [Siddiqui] and Tauqir Shah the only people left to represent Pakistan?" the CJ asked.
The appointment of Jahangir, the ambassador to the United States, has also been a controversial issue as opposition parties have accused former premier Shahid Khaqan Abbasi of appointing his "business partner's son" as the top envoy to the US.
The AG then said that Shah's removal would lead to the country's "defamation", an argument dismissed by the CJ.
"Pakistan will not be defamed but held in esteem. The world is realising that our country is ruled by the law," Justice Nisar said.
Rather than be unceremoniously dismissed from service, Shah offered his resignation from the post. The court accepted, asked for the resignation to be submitted in writing, and adjourned the hearing for a day.