Top US and Mexican officials sought common ground on Friday on issues such as migration and drug trafficking, even as President Donald Trump combatively repeated his vow to make Mexico pay for his planned border wall.

US Secretary of Homeland Security John Kelly struck a conciliatory tone as he wrapped up a three-day trip to Mexico.

"I cannot stress enough how valuable the US-Mexico relationship is to each of our nations," he said.