A year ago you could have got very good odds betting on these outcomes, and frankly even now commentators are struggling to explain why they happened.
I am certainly not claiming to have the answer, but it strikes me that one thing in particular played an important part.
This is the fact that many people in both the UK and the USA felt ignored by national political leaders, in the face both of huge economic change, due to globalisation combined with the demise of traditional industries, and of the impact (both perceived and real) of significant immigration in many parts of our countries.
Many people voted to leave the EU either because they had had enough of these things, or because they feared what the future would bring if they carried on unchecked.
Most mainstream politicians, whether inside the Westminster Village or the Washington Beltway, just didn’t get it while Donald Trump and Nigel Farage clearly did.
The challenge now is what we do next, and following Prime Minister Theresa May’s White House talks with President Trump.
One key issue has to be what kind of society we want to try to shape for our own future, and for that of our children and grandchildren.
And to answer that question we need also to take a hard look at our record over both immigration and economic policy over the last 50 years.
In many ways the UK has a proud history of welcoming immigrants, whether Huguenots fleeing persecution in France or the Asians expelled from Uganda by Idi Amin.
Both of these communities became largely well-integrated into British society and recognised for the economic and cultural contribution that they made.
But it has not always been so straightforward. In the post-war period, Britain invited large numbers of people from both the West Indies and the Indian subcontinent to help in the regeneration of our economy and the maintenance of traditional industries like textiles, not least here in Yorkshire.
We need to be honest about the fact that those who came did not always receive a warm welcome from the locals (to put it mildly). And at the same time – and partly for the same reason – these people also tended to end up living in communities close to others with the same background.
And that really is only natural. When my family and I moved to Switzerland 25 years ago, it was to serve the English-speaking expatriate community. People wanted to get together with others who spoke the same language and with whom they had many things in common – and the church of which I was Chaplain would not have been there otherwise!
The problem is when immigration does not lead on to some degree of mutually beneficial integration – that is the joint creation of lasting relationships between people of different cultural backgrounds. Then we can end up seeing each other as a threat and something to either fear or despise – and that is very dangerous indeed.
For us in Switzerland, integration into the local community was never complete, but it became a lot easier when we started to learn both the language and some of the local culture – including Swiss rules like not running the washing machine late at night or gardening on a Sunday, both of which were likely to annoy the neighbours.
I believe we have a lot of catching up to do in this country, partly because of mistakes that were made 50 years ago, and of our failure as a nation to address honestly issues to do with immigration and integration ever since.
The Government has a role to play, through recognising both that large parts of our population feel left behind or threatened by the consequences of economic change and globalisation. We really do need a Northern Powerhouse in one form or another.
And immigrant communities, from wherever they come, need help overcoming barriers to integration, including, for instance, through the provision of language teaching, which is currently facing major funding cuts.
But I also believe that faith communities and other local groups have an important part to play in naming and addressing some of these issues, so that they become part of the solution and not (as they have sometimes been) part of the problem.
It is hard for individuals on their own to make a real difference. And government, both local and national, also struggles to tackle these issues effectively because it is seen as too impersonal and is often viewed with suspicion.
Faith groups can, and should, play a part in challenging attitudes in their own communities and in reaching out to others and working together for the good of all.
There is a real need for Christian churches as well as Muslim and other faith organisations to be honest about what has gone on in the past – and still goes on, not least since the Brexit vote.
And we must commit ourselves above all to building bridges between our communities instead of walls.
* The Right Reverend Dr Jonathan Gibbs is Bishop of Huddersfield. He will be speaking at an event, called Crossing Thresholds, in Elland next Wednesday when clergy from the Diocese of Leeds will discuss what Brexit means for inter-faith relations.