The most senior Chinese official to visit Taiwan in 60 years has hailed the trip as a success but said the road to better ties was still long and difficult.
"We have successfully accomplished this memorable voyage," Chen Yunlin, the head of the Chinese government's department in charge of Taiwan affairs, said on Friday before leaving the island.
"We have completed the mission that people across the strait have long desired and have handed over to us.
"We believe the future road is long but we will shoulder it and face up to this and that difficulty."
Chiang Pin-kuang, Chen's Taiwanese counterpart, also declared the trip a success.
"Our efforts weren't wasted," he said. "We will continue to strive for our ultimate goal of peace across the strait and a win-win economic situation."
Protests
During Chen's five-day trip, the two sides avoided discussing thorny political issues that had kept them from talking for decades.
Chen signed a landmark trade deal expanding aviation and shipping links across the Taiwan Strait, agreed to exchange rare animals with Taiwan and to work on measures designed to boost co-operation on food safety issues.
"We will do our best to contribute to the welfare of the people across the strait," he said.
Chen also thanked the thousands of police deployed to protect him during his mission in Taipei which sparked daily street protests that were often violent.
Police used water cannons to disperse the crowd, and dragged away those shouting anti-China slogans.
"We are Taiwanese, not Chinese," said one protester.
"So we are fighting for freedom. We want our own people to be here, and not China to take over everything. Everyone is afraid of China."
On Thursday Chen met Ma Ying-jeou, Taiwan's president, to exchange gifts and have a brief chat amid anti-China protests against efforts by Ma to seek closer ties with the mainland.
The meeting was brought forward by several hours and kept to just five minutes to try to avoid violent protests the night before that had trapped Chen in a Taipei hotel for a few hours.