By Dr Merriden Varrall, the Lowy Institute's East Asia Program Director, and Jackson Kwok, an intern in the East Asia Program.

Given the somewhat rocky few months President Xi Jinping has endured, his state visit to the US provided an ideal opportunity to reinforce his domestic legitimacy and his success in steering China towards achieving its dream of national rejuvenation. The Chinese media has played its part, emphasising China's role as an important and responsible great power on par with the US.

The positive spin is not a surprise, considering a media directive by the Cyberspace Administration of China which warned Chinese news organisations not to publish 'negative news' about Xi's visit. The challenges facing US-China relations were sidelined as 'petty' issues to be overcome by further cooperation.

The visit was also of great interest to Chinese netizens – the hashtag #FollowUncleXitotheUS remained Weibo's highest-trending topic for a week, with the combined posts gaining more than 500 million views. However, just as in the official media, discussion has been heavily monitored and the vast majority of comments 'harmonised'.

Responding to the media directives, Chinese official media coverage portrayed China as a great power with international relevance equal to the US, enjoying a 'special relationship' with the US that has global implications.

People's Daily, for example, said 'US-China relations will determine the future of the world together', and characterised the US and China as inseparable. An article in Xinhua said US-China cooperation is a 'gospel' for the world, stressing that both powers carry great influence and responsibility. Xinhua portrayed the Obama-Xi summit as a conversation between two mutually respectful friends which reached 'important consensus and results.' In this narrative, win-win cooperation will prevail over the 'petty' issues of cybersecurity and maritime disputes.

The Chinese media also frequently referred to the concept of 'a new type of great power relations' to demonstrate the parity between the world's two largest economies – without recognising that Washington has not embraced the concept. Indeed, a document published by People's Daily outlining the 49 outcomes of the Obama-Xi summit lists the new type of great power relations as the first item where 'a main consensus and outcome was reached by the two sides.'

Reiterating the idea that the future of the world's prosperity depends as much on China as it does the US, state-owned media repeatedly noted the importance of Sino-US cooperation. Both the US and China were lauded for overcoming their 'stormy history' and committing to work together for mutual and global benefit. Indeed, Xi mentioned in one of his speeches in Washington that 'the US and China have no choice but to seek win-win cooperation.' Areas for further cooperation between the two countries included climate change, energy, and food security. To add credence to the claim that the future of the planet depends on China and the US working together, and that China was well and truly embracing this responsibility, Chinese media referred to interviews with high profile international commentators including Henry Kissinger and Kevin Rudd.

Chinese media coverage of Xi's speech to the UN also emphasised China's contribution to the greater global good. Xinhua used Xi's address to the UN General Assembly (see video) as an example of how China, as a global power, is taking on its share of responsibility. China's pledge of $2 billion to fight poverty was reported as evidence of this commitment to global issues.

Across Chinese state media, Xi himself was portrayed as a confident leader on the world stage, respected by and popular among the international community. According to an article in the Global Times, his addresses were met with 'waves of applause' and 'gained the wide-spread support of the international community.' A separate article discussed how he 'moved the hearts of the American people.'

In spite of the amount of Chinese coverage of the visit, there was very little reportage of the challenges facing US-China relations. Contentious issues and areas where the two countries' interests might conflict were conspicuously avoided. The fraught issue of cybersecurity, for example, shifted from a topic not even open for discussion in China to being portrayed as an area where the two countries can successfully cooperate. US concerns about China's controversial construction in the South China Sea went virtually unmentioned in Chinese reports. Details of street protests and petitions in the US criticising China's human rights records were similarly absent.

Following the controversial Tianjin explosions and a series of stock market crises last month, public confidence in Xi's leadership has, arguably, needed some serious bolstering. The 3 September military parade partly addressed this need by portraying Xi as firmly in control of ensuring China's future as a strong and respected global power. Likewise, Xi's state visit to the US was used to highlight China's powerful and important position on the world stage and Xi's own status as a respected global figure. Coverage has aimed to strengthen the Chinese people's impression that Xi is capably representing China and building its image so that it is accepted and respected by Washington and the international community. This supports the greater narrative of Xi's 'China dream', in which Xi and the Communist Party are portrayed as confidently steering China on the path towards national rejuvenation.

It will be interesting to see how committed Beijing remains to this rhetoric in the lead-up to the US elections as American politicians compete to prove they are 'tough on China'.