Michael Bloomberg | Drew Angerer/EPA Michael Bloomberg: Brexit is ‘stupidest thing any country has ever done’ Except the election of Donald Trump, that is.

Media mogul and former New York Mayor Michael Bloomberg said Brexit voters tried to "ruin" the U.K. and described the decision to leave the European Union as an almost unparalleled act of stupidity.

“It is really hard to understand why a country that was doing so well wanted to ruin it," he said at a technology conference in Boston, according to the Guardian Tuesday.

“I did say that I thought it was the single stupidest thing any country has ever done but then we Trumped it” — a reference to the election of Donald Trump.

The paper said the remarks were made earlier in October at the HUBweek conference, with the lines about Brexit and Trump repeated at an event in France Monday. Bloomberg was in London Tuesday to open his firm's new European headquarters.

“One of the things that is hurting us both in the United States and in the U.K. is that we have employees, not a lot but some, who are starting to say ‘I don’t want to work here — can we transfer to some place else? This country doesn’t like immigrants,’” Bloomberg said.

“All this talk in Washington — words have consequences. Whether we change the immigration laws or not, there is general feeling around the world that America is no longer an open, welcoming place and a lot of people don’t want to go there, and the same thing is happening in the U.K. because of Brexit.”

“[Brexit] was not a smart thing to do and getting out of it is going to be very difficult and is going to be very painful. It will hurt industries. People are already taking space in other cities over there [Europe], us included,” said Bloomberg.