Two weeks after Xi Jinping ascended to China's most powerful post, he took his top lieutenants to a history museum.
The seven men wore nearly identical black jackets. They stopped at an exhibit titled "The Road to Rejuvenation." Surrounded by images of Japanese invaders and British traders, Xi spoke of a vision for the country that would overcome a century of humiliation and resurrect the greatness of China's more glorious past. He called this the Chinese Dream.
It appeared a fitting, if unusual, photo op for a new leader seeking to inspire. But few grasped the scale of ambition for that transformation.
Five years later, almost to the day, Xi has driven out rivals, installed himself as head of key committees, overhauled the military, launched an aggressive foreign policy and silenced activists. A man selected largely because Communist Party elders thought they could control him is solidifying his role as the most authoritarian leader since Mao Tse-tung.
The twice a decade party congress, which starts Wednesday and launches Xi's second five-year term, will indicate the breadth of his command.
"He realizes he can't make people love him and hate him at the same time," said Zhang Lifan, a Beijing historian. "So his main consolidation method is to make people fear him."
Xi's path from average administrator to messianic leader is a tale of luck, underestimation and strategy.
His predecessor, Hu Jintao, had the charisma of a stick. The Communist Party was torn into factions and veering toward crisis. Corruption was pervasive. As the 2012 party congress approached, the government made its usual effort to ensure nothing went wrong. It didn't work.
The wife of flamboyant Chongqing party secretary Bo Xilai was accused of murdering a British businessman. The revelation unraveled one of the party's rising stars. Then, Hu's top aide, Ling Jihua, was demoted and later accused of covering up the death of his son, who left a party with two women and crashed his black Ferrari.
Party leaders needed someone who could provide solid leadership.
"They got more than they bargained for," said Susan Shirk, chair of the 21st Century China Center at UC San Diego.
Xi didn't always command attention. He was an adept, if unremarkable, official in the southern provinces of Fujian and Zhejiang, before heading to Shanghai. When he wed a famed Chinese opera singer — after a rarely mentioned first marriage — people joked, "Who is Xi Jinping? He's Peng Liyuan's husband."
But his pedigree set him apart. Xi's father was a top lieutenant to Mao and led the propaganda bureau before he was purged during the Cultural Revolution. (The elder man later returned to the government's good graces.) Xi, who experienced his own "reeducation" in the frigid, northwestern countryside, is the equivalent of Chinese nobility.
Xi took care to not make enemies as he rose through the party ranks. A U.S. Embassy cable in 2009, disclosed by WikiLeaks, called Xi "exceptionally ambitious" and a man who survived the era's chaos by becoming "redder than red."
In 2012, he was a compromise choice for party leader.
Xi, 64 — who towers over many of his colleagues, with a wan smile that conveys detachment — surrounded himself with allies. The most important of those picks was longtime friend Wang Qishan, whom he tasked with heading an anti-corruption agency.
"It was incredibly important that he got somebody into that position who was both on board with what Xi wanted to do and incredibly competent," said Trey McArver, co-founder of the Beijing research firm Trivium China. "The discipline commission is the instrument through which Xi consolidated power."
Xi vowed to trounce the most powerful officials and the lowliest cadres, "tigers" and "flies," in a campaign to curtail the party's extravagances. Many viewed the move as critical to eradicate the flagrant greed corroding society like cancer. But the effort also sidelined his challengers.
It didn't take long before the anti-corruption agency bagged its biggest catch. In 2013, officials began investigating China's former domestic security chief, Zhou Yongkang. He was later sentenced to life in prison for bribery, abuse of power and disclosure of state secrets.
The agency also went after commanders in the military, an echelon of power within the Communist Party. This summer, officials targeted Sun Zhengcai, another Chongqing party secretary and potential contender for top leadership. A Xi supporter replaced him.
As of June, the commission had investigated more than 1 million grass-roots-level officials.
Xi's crackdown has proved a useful tool. It helped him restructure the People's Liberation Army, turning the military into a leaner, more modern force with 300,000 fewer troops and a new crop of loyal leaders.
"He's the only master now," said Jean-Pierre Cabestan, a professor of Chinese politics at Hong Kong Baptist University.
But it's the economy that really matters to Xi and a party determined to create a "moderately prosperous society" that maintains stability through steady growth. Xi has taken the helm of a high-level economic committee, a post generally reserved for the premier, Li Keqiang, along with key small groups that include those responsible for national security and foreign policy. He's accumulated at least a dozen titles, among them "core leader," a symbolic label his predecessor never received.
"Xi has been able to amass a lot of power by clawing authority into the party," said Jude Blanchette, a researcher at the Conference Board in Beijing.
Red banners proclaiming Xi's status cling to gates. Signs listing "core socialist values" have started appearing in taxis, temples, restaurants, barbershops and even on tissue boxes — from central Beijing to Wuhan, where the 1911 revolution that toppled China's emperors began. Words such as patriotism and harmony underscore the extent to which Xi has sought to strengthen party ideology by weaving it into society.
"Marxism must be the basic fundamental, guiding principle, or the party will lose its soul and direction," Xi told members last year on the party's 95th anniversary.
That directive has come with tighter controls. Xi has overseen the jailing of hundreds of human rights lawyers and activists, increased online censorship, decried Western values and started working on a "social credit" system that punishes people based on bad behavior, such as paying credit cards late or skimping on subway fare.
Conservative efforts such as these existed before Xi, but he has pushed them further and harder.
Even ambitious businessmen are feeling pressure. Wu Xiaohui, whose Anbang Insurance Group owns the Waldorf Astoria, vanished in June. Wang Jianlin, the billionaire chairman of Dalian Wanda, once announced plans to take over Hollywood. His company, which owns AMC Theaters and Legendary Entertainment, is now pulling out of investments abroad.
Globally, Xi has made aggressive claims to islands in the South China Sea and launched a massive infrastructure plan that seeks to expand the country's international influence.
He has done this while playing up a Chinese brand of populism. Images at an exhibition commemorating Xi show him chopping wood with villagers and kissing red-faced babies. State media love to mention his lunch at a Beijing dumpling shop, where he insisted on paying.
Even his past is narrative. A teenage Xi was among the so-called sent-down youth during the Cultural Revolution; he lived in a cave infested with fleas. Hundreds now make the pilgrimage to that village and hear a version of Xi's life that fits into the communist triumphalism he hopes to reinforce.
"He's paved the groundwork methodically for becoming one of the longest-ruling leaders in the Communist Party," said Willy Lam, an expert on elite politics with the Chinese University of Hong Kong.
This week's congress will determine whether Xi's concepts are enshrined in party orthodoxy. It's also intended to anoint the country's next leader, who will take control in five years.
That may not happen, opening the possibility that Xi will find a way to stay on past a decade, continuing to mold China in his image.
Nicole Liu in The Times' Beijing bureau contributed to this report.
Meyers is a special correspondent.