This weekend's historic summit in Singapore between the presidents of China and Taiwan may have surprised many, but the sides first broached the subject about two years ago and the leaders had their legacies very much in mind.
For Chinese President Xi Jinping, the summit may not change the outcome of Taiwan's presidential election in January which the island's main opposition Democratic Progressive Party (DPP) is widely expected to win, two sources with ties to the Chinese leadership said. Anti-China sentiment is rising in Taiwan.
But longer term, Xi hopes to cement his place in China's pantheon of great leaders if he is able eventually to lure the self-ruled democratic island, which Beijing claims as its own, back to the fold, the sources said.
"Xi is not thinking about just the present. It's long term," one source told Reuters, requesting anonymity due to the sensitivity of the issue.
"If Xi could eventually create a framework for reunification, he would be as great as, if not greater than Deng Xiaoping," added the source, referring to China's late paramount leader who negotiated Hong Kong's 1997 return to Chinese rule.
Taiwan President Ma Ying-jeou, who must step down next May due to term limits, has made improving economic links with China a key policy since he took office in 2008.
He has signed landmark business and tourism deals, although there has been no progress in resolving political differences.
However, Ma's popularity rating is abysmal, according to media surveys.
Instead, he could be remembered by posterity for brokering the first meeting between the rivals in decades that eventually paved the way for an end to more than 60 years of hostility, analysts said.
"We want to consolidate the hard-won cross-Strait achievements, including peace, prosperity and security status quo," said Andrew Hsia, minister of Taiwan's top China policymaker, the Mainland Affairs Council (MAC).
"(It) is an important step in promoting the overall institutionalization of the cross-Strait relationship."
TROUBLED PAST
Beijing and Taipei have been diplomatic and military rivals since 1949, when Chiang Kai-shek's Nationalists, also known as the Kuomintang (KMT), fled to Taiwan after losing the Chinese civil war to Mao Zedong's Communists on the mainland.
Beijing has since sought to push Taipei into diplomatic isolation, ousting Chiang's Republic of China, Taiwan's formal name, from the United Nations in 1971.
The Communists and the KMT agree there is "one China", but disagree on the interpretation.
The DPP traditionally has favored independence for Taiwan and believes Taiwan's future is for the island's people to decide. Beijing takes that to mean independence.
Trade, investment and tourism have blossomed, particularly since Ma of the ruling, China-friendly Nationalists took power in 2008. But for China, the civil war is not over as the two sides never signed a ceasefire or peace agreement.
China menaced Taiwan with war games and missile tests in the run-up to the island's first direct presidential elections in 1996.
The summit in Singapore on Saturday came to fruition after two years of negotiations.
It all began in November, 2012 when Ma sent a cable to congratulate Xi after the latter took over as Communist Party and military chief, describing bilateral relations as the "most peaceful and stable in six decades".
Xi wrote back, calling for both sides to "seize (this) historic opportunity and deepen mutual trust", the Chinese sources said.
Then, in July 2013, Xi cabled Ma to congratulate him on his election as chairman of the KMT, or Nationalist Party. Xi called for the sides to "conform to the trend of global development ... and ascend a height to look far", the sources said.
In October that year, Xi told Taiwan's envoy to the Asia-Pacific Economic Cooperation (APEC) leaders' summit in Bali that "long-term political differences between the two sides must be gradually resolved. After all, it cannot be passed on from generation to generation".
Xi also called for furthering "political" mutual trust. Previous talks focused on "economic" issues.
A breakthrough came in February 2014, when China's ministerial-level Taiwan Affairs Office and its Taiwan counterpart, the MAC, held unprecedented talks in Nanjing, China's capital when the KMT ruled all of China.
"It was a huge concession on our part," a second source with Chinese leadership ties said, referring to talks between the two governments which do not recognize each other.
WHERE TO MEET?
In the past, bilateral talks were party-to-party or between China's semi-official Association for Relations Across the Taiwan Straits and the island's Straits Exchange Foundation.
The Taiwan Affairs Office and MAC toyed with the idea of a summit between Xi and Ma, but could not agree on the venue and in what capacity the two leaders would meet.
Initially Ma had hoped to attend the APEC summit in Beijing in November 2014, the Chinese sources and MAC's Hsia said. But Beijing rejected this.
"The mainland had reservations about meeting in an international setting," Hsia said.
Singapore came up as a possible venue during the most recent round of talks between the Taiwan Affairs Office and MAC in the southern Chinese city of Guangzhou in October, Hsia and the Chinese sources said.
After consultations with their respective bosses, Singapore was chosen as the venue and timed to coincide with Xi's visit to the city-state.
QUESTIONS OVER TIMING
The DPP's standard-bearer, Tsai Ing-wen, was skeptical of the timing of the summit, but Hsia said the presidential election was not considered as a factor.
A senior KMT official, who spoke on condition of anonymity, said Xi had pushed for a breakthrough in ties with Taiwan since coming to power, but with Ma stepping down and the opposition likely to win the election, he had to move now.
"That made Xi even more anxious to meet Ma Ying-jeou now," the KMT source said. "Don't forget the DPP still has Taiwan independence stated clearly in its party program."
Ma's office sought to placate detractors, pledging that no agreements would be signed with Xi and no joint statement would be issued.
In an interview with Reuters in October, Ma said the island was not ready to discuss unification with China.
It was unclear if the summit will help or hurt the KMT's narrow chances of clinging on to the presidency.
Asked if Xi would meet Tsai if she won, the first source with ties to the Chinese leadership said: "Anything is possible. It hinges on what she says and does."