Answer by taking a quote from the following article:

- Sahibzada Iskander Ali Mirza (Urdu: skhndr mrz;Bengali: iskaandaar mirjaa); 13 November 1899 - 13 November 1969), CIE, OSS, OBE, was the first President of Pakistan, elected in this capacity in 1956 until being dismissed by dictator Ayub Khan in 1958. The great grandson of Siraj ud-Daulah, Mirza was educated at the University of Mumbai before attending the military academy in Sandhurst in the United Kingdom. After a brief military service in the British Indian Army, he joined the Indian Political Service and spent the majority of his career as a political agent in the Western region of the British India until elevated as joint secretary at the Ministry of Defence in 1946. After the independence of Pakistan as result of the Partition of India, Mirza was appointed as first Defence Secretary by Prime Minister Liaquat Ali Khan, only to oversee the military efforts in first war with India in 1947, followed by failed secessionism in Balochistan in 1948.

Mirza grew up and completed his schooling in Bombay, attending the Elphinstone College of the University of Bombay, but left the university to attend the Royal Military Academy in Sandhurst when he was selected by the British Governor-General for the King's Commission. Mirza was the first Indian graduate of the military academy, and gained his commission in the British Indian Army as 2nd Lt. on 16 July 1920. As was customary for newly commissioned British Indian Army officers, he was initially attached for a year to the second battalion of the Cameronians (Scottish Rifles). On 16 July 1921, he was promoted to lieutenant and was assigned to command a platoon on 30 December 1921. His military career was spent in the Military Police. In spite of hailing from Bengal, his military career was mostly spent in the violent Western region of India, participating in the Waziristan war in 1920. After the campaign, he was transferred to the 17th Poona Horse (Queen Victoria's Own), as an army inspector but left active service to join the Indian Political Service (IPS) on August 1926. His first assignment was posted in Aligarh in Uttar Pradesh as an assistant commissioner before posting as political agent in Hazara in the North West Frontier Province. He received promotion to army captain on 17 October 1927. From 1928-33, Mirza spent time as political agent in the troubled Tribal belt, having served as an assistant commissioner in the districts of Dera Ismail Khan on April 1928, Tonk on May 1928, Bannu on April 1930, and Nowshera on April 1931. In 1931, Captain Mirza was appointed a district officer and later posted as deputy commissioner at Hazara in May 1933, where he served for three years until a posting to Mardan as assistant commissioner from October 1936 (deputy commissioner from January 1937). Promoted to major on 16 July 1938, he became the political agent of the Tribal Belt in April 1938, stationed at Khyber. He remained there until 1945. Mirza was appointed and served as the political agent of Odisha and North West Frontier Province from 1945 until 1946. He was promoted to Lieutenant-Colonel on 16 July 1946. His ability to run the colonial administrative units had brought him to a prominence that prompted the British Indian Government to appoint him as the Joint Defence Secretary of India in 1946. In this position, he was responsible for dividing the British Indian Army into the future armies of Pakistan and India. Around this time, he became closer to Liaquat Ali Khan and began formatting political relations with the politicians of the Muslim League. After the legislative elections held in 1954, the Awami League had been successfully negotiating with the Muslim League for a power-sharing to form the national government against the Republican Party. By 1958, I.I. Chundrigar and A.Q. Khan had successfully reorganized the Muslim League that was threatening the reelection and political endorsement for Mirza for the second term of his presidency. Furthermore, the Republican Party presided by Prime Minister Sir Feroze Khan had been under pressured over the electoral reforms issue at the National Assembly. Upon witnessing these developments, President Mirza ordered the mass mobilization of the military and imposed emergency in the country after declaring the martial law against his own party's administration led by Prime Minister Feroze Khan by abrogating the writ of the Constitution and dissolving the national and provisional assemblies on the midnight of 7/8 October 1958. In morning of 8 October 1958, President Mizra announced via national radio that he was introducing a new constitution "more suited to the genius of the Pakistan nation", as he believed democracy was unsuited to Pakistan "with its 15% literacy rate". Upon abdicating, Mirza took the nation into confidence, saying that: Three weeks ago, I (Iskander Mirza) imposed martial law in Pakistan and appointed General Ayub Khan as Supreme Commander of the [Armed Forces] and also as Chief Martial Law Administrator.... By the grace of God... This measure which I had adopted in the interest of our beloved country has been extremely well received by our people and by our friends and well wishers abroad... I have done best to administer in the difficult task of arresting further deterioration and bringing order out of chaos... In our efforts to evolve an effective structure for future administration of this country... Pakistan Zindabad, Pakistan Zindabad! This martial law imposed by country's first Bengali president was the first example of martial law in Pakistan, which would continue until the dissolution of East Pakistan in 1971. Iskander Mirza appointed then-Army Commander of the Pakistan Army, General Ayub Khan, as the Chief Martial Law Administrator (CMLA), which proved his undoing within three weeks. The two-man rule political regime was evolved under President Mirza and his appointed chief martial law administration and then-army chief General Ayub Khan. However, the two men had very different point of view on running the government with the new situation, even though they were responsible for bringing about the change. President Mirza had not envisaged any change in his previous powers; he wanted to retain the ability to maneuver things in keeping with his own whims. Judging from the situation, the things however had changed as the time and situation both were demanding the complete solution. General Ayub Khan came to an understanding that the real political power rested with the support from the military, and within a week of enforcing the martial law, President Mirza realized the delicate position he got himself into. In an interview with Dawn, President Mirza regretted his decision saying: "I did not mean to do it" while offering assurances that the martial law would be for the shortest possible duration. In 1959, President Mirza accepted the resignation of Vice-Admiral M.S. Choudhri, replacing with Vice-Admiral A.R. Khan as the new naval chief but the civil-military relations continued to be a dominant factor between President Mirza and General Ayub Khan. In an attempt to consolidate the powers under his control, President Mirza appointed a new administration cabinet that consisted of bureaucrats and technocrats and unsuccessfully tried by role of the CMLA General Ayub Khan as the Prime Minister on 24 October 1958 but such actions could not implemented due to General Ayub Khan's strong protest and briefly lodged a complain to President Mirza about his "high hand" method. The new administration did not satisfy CMLA Ayub Khan who had more control in the administration than President Mirza. Ayub dispatched the military unit to enter in presidential palace on the midnight of 26-27 October 1958 and placed him in an airplane to exile in England. Subsequently, Admiral A. R. Khan and four army and air force generals: Azam, Amir, Wajid, and Asghar Khan were instrumental in the demise of President Mirza. CANNOTANSWER

What happened regarding the dismissal and end of presidency?

civil-military relations continued to be a dominant factor between President Mirza and General Ayub Khan.