What was Jiang's previous position before becoming the president of China?

Context: Jiang Zemin was a Chinese politician who served as general secretary of the Chinese Communist Party from 1989 to 2002, as chairman of the Central Military Commission from 1989 to 2004, and as president of China from 1993 to 2003. Jiang was paramount leader of China from 1989 to 2002. He was the core leader of the third generation of Chinese leadership, one of four core leaders alongside Mao Zedong, Deng Xiaoping and Xi Jinping.

Born in Yangzhou, Jiangsu, Jiang joined the CCP while he was in college. After the establishment of the People's Republic of China in 1949, he received training at the Stalin Automobile Works in Moscow in the 1950s, later returning to Shanghai in 1962 to serve in various institutes, later being sent between 1970-1972 to Romania as part of an expert team to establish machinery manufacturing plants in the country. After 1979, he was appointed as the vice chair of two commissions by vice premier Gu Mu to oversee the newly-established special economic zones. He became the vice minister of the newly-established Ministry of Electronics Industry and a member of the CCP Central Committee in 1982.

Jiang was appointed as the mayor of Shanghai in 1985, later being promoted to its Communist Party secretary, as well as a member of the CCP Politburo, in 1987. Jiang came to power unexpectedly as a compromise candidate following the 1989 Tiananmen Square protests and massacre, when he replaced Zhao Ziyang as CCP general secretary after Zhao was ousted for his support for the student movement. As the involvement of the "Eight Elders" in Chinese politics steadily declined, Jiang consolidated his hold on power to become the "paramount leader" in the country during the 1990s. Urged by Deng Xiaoping's southern tour in 1992, Jiang officially introduced the term "socialist market economy" in his speech during the 14th CCP National Congress held later that year, which accelerated "opening up and reform".

Under Jiang's leadership, China experienced substantial economic growth with the continuation of market reforms. The returning of Hong Kong from the United Kingdom in 1997 and of Macau from Portugal in 1999, and entry into the World Trade Organisation in 2001, were landmark moments of his era. China also witnessed improved relations with the outside world, while the Communist Party maintained its tight control over the state. Jiang faced criticism over human rights abuses, including the crackdown on the Falun Gong movement. His contributions to party doctrine, known as the "Three Represents", were written into the CCP constitution in 2002. Jiang gradually vacated his official leadership titles from 2002 to 2005, being succeeded in these roles by Hu Jintao, although he and his political faction continued to influence affairs until much later. On 30 November 2022, Jiang died from leukemia and multiple organ failure in Shanghai.

Answer: He was the mayor of Shanghai and then became Communist Party secretary