They did so in their capacity as ruling party leaders, rather than as heads of state, to skirt the disputed issue of Taiwan's sovereignty.
It was the latest sign in rapidly improving relations between the once bitter enemies. In the 14 months since Taiwanese President Ma Ying-jeou took power, those ties have morphed from mutual suspicion and antipathy to bilateral expressions of amity and understanding, amid thriving trade and investment.
According to a statement from Ma's Nationalist Party, Chinese President and Communist Party chief Hu Jintao sent a telegram to the Taiwanese leader congratulating him on his election Sunday as party chairman, and told him he hopes his party can work with the Nationalists in the best interest of both sides.
"I hope both our parties can continue to promote peaceful development in cross-strait relations, and help bolster mutual trust between the two sides in political affairs," Hu's telegram said, according to the statement. China's state-owned Xinhua News Agency confirmed that Hu sent the note.
In return, Ma called for both sides to work toward peace.
"We should continue efforts to consolidate peace in the Taiwan Strait and rebuild regional stability," Ma said, according to the Nationalists, in his reply.
It was the latest installment in the gradually warming ties between the Nationalists and Communists. The two sides fought an on-again-off-again civil war for more than two decades on the Chinese mainland before the defeated forces of Chiang Kai-shek fled to Taiwan in 1949. Nationalist Party Chairman and then opposition head Lien Chan broke the ice between them when he held a historic meeting with Hu in Beijing in 2005.
Kao Huei of Taiwan's National Kinmen Institute of Technology said the messages between Hu and Ma continue the tradition begun by Lien.
"It is an exchange of friendly gestures," Kao said. "However, it is too early to say whether this will set the foundation for future direct communications between the two as presidents."
Because China still considers Taiwan to be part of its territory, bilateral ties between Taipei and Beijing are conducted through semiofficial channels to circumvent the touchy issue of sovereignty - the Straits Exchange Foundation on the Taiwanese side and the Association for Relations Across the Taiwan Strait on the Chinese side. The Straits Exchange Foundation is partly funded by the Taiwanese government.
While Ma's telegram addressed Hu as the Communist Party's general secretary, Hu simply called the Taiwanese leader "Mr. Ma," in an apparent attempt to avoid the sovereignty issue.
Hu and Ma exchanged telegrams directly once in 2005, when Ma was elected opposition chairman. He stepped down from that post when he was indicted on graft charges, which he was exonerated of in 2007.