US President Barack Obama has once again slammed Republican presidential nominee Donald Trump over his stance on Mexico and immigration, hours after the Republican nominee officially claimed the party mantle to take on presumptive Democratic nominee Hillary Clinton in November.

“Let me start by saying something that is too often overlooked, but bears repeating — especially given some of the heated rhetoric that we sometimes hear. The United States values tremendously our enduring partnership with Mexico and our extraordinary ties of family and friendship with the Mexican people,” Obama said at the start of a joint press conference with Mexican President Enrique Peña Nieto.

Obama then remarked on the “millions of tourists, businesspeople, and friends, family” who “cross the border legally” every year, pointing out the importance that Mexico holds as the United States’ third-largest trading partner. “On a whole host of issues, from our shared security, to climate change, Mexico is a critical partner, and is critically important to our own well-being,” Obama said. “We are not just strategic and economic partners. We are also neighbors, and we’re friends, and we’re family — including millions of Americans that are tied to Mexico by culture and by language. And that’s why as president, I worked to deepen the partnership between our nations.”

The U.S. President suggested that no matter who leads either country, Mexico’s relationship with the U.S. would endure. He noted that, while “the issue of the border” “obviously always gets a lot of attention,” most recent migration flows have come from Central America, not Mexico.

“And if it were not for the hard work of Mexico in trying to secure its border to the south and to cooperate with us, we would have a much more significant problem. And that is not always easy,” Obama said. “That requires resources and policy decisions made by the Mexican government, but the cooperation on that front has been absolutely critical in making sure that we deal with these issues in a serious way and in a humane way. And we continue to make progress on that front.”

Finally, Obama stressed that the benefit of a cooperative Mexico is going to do a lot more to solve any migration crisis or drug trafficking problem than a wall, concluding by saying “it’ll be much more reflective of the kind of relationship that we should have with our neighbors”.