It was called Mandarin.
My belief is that the word Mandarin should no longer be used because it is a remnant word from more than a century ago, in the nineteenth century. It is based on the Chinese phrase man da ren 满大人 which means “Manchu official”
The standard word for standard spoken Chinese should be Putonghua 普通话 which is, in my opinion, the correct term used in mainland China。 In my opinion, the word Mandarin should be treated the same as the word “negro” in American English.
That is, polite educated people no longer used it.
Pinyin was adopted by the Chinese government in 1978 as the official way of transliterating Chinese characters, replacing the Wade-Giles system which was used during the Republic of China period. The Wade-Giles system had been developed by the British in the 19th century; pinyin was a system which had been developed by Chinese for Chinese.
So when you say the switch to pinyin out of “convenience” you are incorrect. It was very deliberate language policy, and since it was government policy, all the foreign news services such as AP, UPI also changed to using pinyin in their spelling of Chinese names.
Example: Mao Tse-tung became Mao Zedong.