When Pakistan became an independent, self-governing nation in 1947, it, like post-independent India, provisionally continued to use the Government of India Act 1935, as its written constitution until a post-independence constitution could be drafted; by default this contemplated the continuation of the constitutional monarchy as a Commonwealth realm dominion.
The monarch appointed a Governor-General, upon the advice of the Prime Minister of Pakistan to serve as de facto Head of State.
Mohammed Ali Jinnah, considered Quaid-e-Azam ("Great Leader"), informed Lord Mountbatten: "when I am Governor-General the Prime Minister will do what I tell him to" -- however Jinnah's rapidly declining health made the issue moot.
After Jinnah's death the Governor-General of Pakistan continued to serve a larger role than the India Act prescribed, dismissing multiple Prime Ministers and consolidating power.
The office of Governor-General was replaced by the office of President of Pakistan when Pakistan became a republic in 1956. The then Governor-General, Iskander Mirza, became Pakistan's first president.
