President Xi Jinping said on Saturday that China is incapable of "hegemony or militarism", after calling for stronger border defences to avoid a repeat of past humiliations by foreign powers.
"Hegemony or militarism is not in the genes of the Chinese," Xi said in a speech commemorating the six-decade old establishment of a commitment to peaceful coexistence with India and Myanmar.
"China neither interferes in other countries' internal affairs nor imposes its will on others," Xi added. "It will never seek hegemony no matter how strong it may become."
Xi spoke to an audience of Chinese officials, military officers and foreign diplomats in a cavernous room in Beijing's Great Hall of the People.
Myanmar President Thein Sein and Indian Vice President Mohammad Hamid Ansari, who also gave speeches, sat on stage as Xi spoke, as did Chinese Premier Li Keqiang and two other top ruling circle officials.
The speeches were part of commemorations for the 60th anniversary of a mutual peace vow by China, Myanmar and India.
The 1954 Five Principles of Peaceful Coexistence include mutually respecting sovereignty and territorial integrity as well as mutual non-aggression and non-interference in each other's domestic affairs.
Xi's speech to an international audience contrasted with nationalistic remarks quoted by state media earlier in the day when he said China should bear in mind its history as a victim of foreign aggression and strengthen its frontier defences on land and sea.
Those comments came at a "national meeting" held Friday and also attended by Premier Li and Vice Premier Zhang Gaoli, the official Xinhua news agency said.
The remarks underscore China's resolve amid testy territorial disputes with neighbouring nations which have accused Beijing of being increasingly aggressive in pressing its claims.
Xi told the Friday meeting that the country's weakness in the past had allowed others to bully it, the report said.
"Foreign aggressors broke China's land and sea defence for hundreds of times, plunging the Chinese nation into the abysm of calamity, Xi added, calling on the people not to forget the history of humiliation and to build a strong frontier," according to Xinhua.
"Xi urged China's frontier defenders to meticulously monitor over and control the frontier and to mount actions to defend the country's maritime right, while implementing an overall national security outlook."
- Tougher military stance -
The comments are Xi's latest calling for a tougher military stance.
Since becoming China's leader during a once-a-decade power transition that lasted from November 2012 until March 2013, Xi has called for the country to boost its military into a force that can "win battles".
Xi's reference to frontiers comes as China is engaged in occasionally tense maritime disputes over territory with Japan, the Philippines and Vietnam.
On land, China has a long-standing dispute with India, with which it fought a brief, but bloody border war in 1962, just eight years after the peaceful coexistence pledge.
And Beijing has also blamed what it calls foreign-based "religious extremists" for fomenting terrorism in its largely Muslim far-western region of Xinjiang, which borders Central Asia.
China's Communist Party has for decades stressed that under its leadership that began in 1949 the country finally overcame more than a century of humiliation by outside powers dating back to the Opium Wars of the 19th century.
Under the last imperial Qing Dynasty, China also saw incursions by western powers and Japan that secured trade and legal concessions as well as control of territory seen in China as unfair.
References to national humiliations, such as the pillaging of the Old Summer Palace by a joint British and French military expedition during the second Opium War in 1860 and the suppression of the Boxer Rebellion in 1900 by a multinational force of Europeans, Americans and Japanese, are common examples.
The Xinhua report on Friday's meeting also said that Xi urged "both the military and civilian communities to strike a balance between frontier defence and economic development".
China's leaders, while stressing their nationalistic credentials, are keenly aware that support also depends on how successfully they steer the world's second-largest economy.