Pena Nieto had invited both Trump and his rival Hillary Clinton, who turned down the offer.

Mexican President Enrique Pena Nieto on Sunday defended his decision to host a visit by US presidential candidate Donald Trump to Mexico, but he said it could have been carried out “in a better way”. The hastily arranged meeting of Trump and Pena Nieto on August 31 sparked outrage in Mexico because of Trump’s verbal attacks on Mexicans as well as his threats to build a border wall and tear up trade deals with Latin America’s No. 2 economy.

Watch What Else Is Making News

“I faced a dilemma of ‘yes or no’ once I had made the proposal and he said ‘yes.’ Because, at the end of the day, its all about ensuring the best interests of Mexico, even if it could be very controversial, as it turned out to be,” Pena Nieto said in an interview on Mexico’s Canal 11 television.

Pena Nieto had invited both Trump and his rival Hillary Clinton, who turned down the offer.

“Could we have done things better? Maybe yes, admittedly. I think that this genuine interest to bring about a meeting to take care of Mexico’s interests, I think, could have been done in a better way,” he said.

During his visit, Trump struck a collaborative tone with Mexico. But as soon as he was back in the United States, he told a crowd in Arizona that Mexico would pay for his massive border wall “100 percent.”

Backlash from the visit forced the resignation of Pena Nieto’s finance minister and trusted aide Luis Videgaray, who had helped arrange the meeting.