“Goodbye China! My gratitude for the warmth & hospitality. Will always remember my visit fondly,” the PM tweeted.
“Let’s make India-China ties even stronger in the years to come,” he said in another tweet.
Modi, who was on a three-day maiden visit to China as the first stop of his three-nation tour, held talks with Chinese President Xi Jinping besides his counterpart Li Keqiang.
On Friday, India and China signed a record 24 agreements in key sectors, including in railways and education.
Both the countries agreed to seek a “political” solution to the border dispute at the earliest as Modi asked Beijing to “reconsider its approach on some issues” and announced confidence building measures like e-visa for Chinese tourists and operationalisation of hotline between the two militaries.
On Saturday, on his last day of his visit, a total 26 business agreements worth over $22 billion were signed between Indian firms and their Chinese counterparts.
On the second leg of his visit, Modi will visit Mongolia to become the first Indian PM to visit the country.
The PM will meet Mongolian President Tsakhiagiin Elbegdorj to strengthen bilateral cooperation in diverse areas.