President Michael D Higgins celebrated Ireland's new trade relationship with Mexico and said Northern Ireland was "in a good place" at his final speech before departing for El Salvador.
He referred to a "cowboy song" when describing the people of Northern Ireland's resilience: "You dust yourself off and you get back up again."
Speaking to hundreds of students from the University of Mexico in the Foreign Ministry, Mr Higgins explained that "we've been able to put a peace process together but it needs regular attention".
He had been asked about the situation in the North by a member of the audience.
In total, seven bilateral agreements were signed during the President's visit in relation to trade and education. Recognising the importance of his visit, Mr Higgins said he "predicted a shared future for Ireland and Mexico with a great opportunity for increasing trade".
Ireland's exports to Mexico grew by 20pc in 2012.
With regard to the behind-the-scenes negotiations in Mexico, Mr Higgins said that the "meetings at the highest levels have been extensive".
He told the Irish Independent that the visit had been a very "positive" exchange and that we had a "wonderful relationship" with Mexico as a result.
The President took questions from the press after his speech and was asked about youth unemployment and emigration at home.
He admitted that people were living on less, and it was "very sad" that we had "such a bright generation" in this situation.
Mr Higgins emphasised the relationship of trust that now existed between Ireland and Mexico and once again made reference to our emergence from recession where "we lost our economic sovereignty".
"We need to do so much more," he said, in relation to sustaining our recovery and not return to pursuing "opportunism".
The President said that he did not "preach a return to the past, to cultures that were strangling us" as we "make a new century".
Mr Higgins received a long standing ovation from the crowd of students, academics and politicians and later received the keys to Mexico City before he departed for El Salvador for the second leg of his visit to Central America.