When British Prime Minister Theresa May called a snap general election back in April, she was supposed to have it in the bag. She had a lead of 20 points, and the consensus view was that Labour leader Jeremy Corbyn was horribly unpopular and his party doomed. He campaigned well, however, and May was truly awful.

The electorate also turned their backs on the panic politics that drenched the election; Corbyn may have made compromising comments about terrorist groups and could well be a neo-Marxist, people agreed, but he believed in the National Health Service, free education and affordable housing. And unlike Theresa May, he seemed normal, ordinary and approachable. Corbyn didn't win of course, but goodness he came close.

An alliance with the DUP

That result has obliged a thrashed Tory party, now without an overall majority, to form a working relationship — effectively an alliance — with the Democratic Unionist Party or DUP. It's the largest party in Northern Ireland with 10 MPs, and if all of them vote consistently with the Conservatives, it will be enough to govern.

But there are more than enough angry Tories in Westminster to make this extraordinarily difficult, and this government and May's career can't have much of a future. In the interim, however, this flawed, failed, but still highly intelligent and ambitious woman will have to be warm and cuddly towards a group of people who are intensely disliked almost everywhere outside of the loyalist community in Northern Ireland.

May, left, and Arlene Foster, leader of the Democratic Unionist Party, have effectively formed an alliance. (Paul Faith/AFP/Getty Images, Clodagh Kilcoyne/Reuters)

And for Northern Irish politics read religion and tribe, and the voting pattern was mostly the same this time round as in most previous elections. The vast majority of Roman Catholics vote for the Social Democratic Labour Party (SDLP) or Sinn Fein, with a few supporting the Alliance Party – a centrist, non-sectarian group with limited influence. The SDLP is republican but opposed to violence, and it was for many years the most significant of the Catholic-supported parties.