Kazakhstan's president has abruptly dismissed Karim Masimov as prime minister, a move that appeared linked to Masimov's eyebrow-raising self-promotion on social media in recent months.

Nursultan Nazarbaev made the announcement on September 8, saying Masimov was being made chairman of the Committee for National Security, an appointment that is widely considered a demotion.

He will be replaced by Deputy Prime Minister Baqytzhan Saghyntaev.

Masimov's dismissal comes after several months of sudden activity on the Internet that many observers considered to be an blatant attempt to promote himself across the Central Asian country.

Photographs of Masimov doing physical exercise appeared on Facebook, Instagram, and Twitter. One photograph that showed him bicycling through the capital, Astana, with his cabinet members attracted wide derision after people poked fun of his mismatched socks.

Another showed Masimov wearing hockey skates and pads, standing on a rink alongside his Russian counterpart, Dmitry Medvedev. That echoes images of other leaders of former Soviet states who have posed in hockey equipment or been shown playing ice hockey, including Belarus's Alyaksandr Lukashenka and Russia's Vladimir Putin.

Masimov also announced via the Internet that he asked Medvedev to return the skulls of Kazakh national liberation movement leaders of the 19th and 20th centuries from a St. Petersburg museum, something that Kazakh nationalists have called for for years.

Masimov also started an initiative on Twitter for Kazakhs to share ideas about the upcoming 25th anniversary of the country's independence from the Soviet Union. The effort, however, ended after many used it to criticize the government for the worsening economic situation caused by the abrupt fall in the oil price the last two years.

The 51-year-old had served as prime minister since April 2014 and held the same post from January 2007 to September 2012.

The dismissal also underscored the political preeminence of Nazarbaev, who has lead Kazakhstan since the Soviet collapse. The 76-year-old is revered by many Kazakhs, but his allies have also marginalized or eliminated any real political opposition.