This is my penultimate column for the Sunday Independent. After writing for the paper for seven years, often on international affairs, it is an appropriate time to draw some threads together on how Ireland can navigate its way in the world during the turbulent times ahead.
For half a century, Ireland has had three vital relationships - with the UK, the EU and the US. Two decades ago, Ireland's world was as perfect as it was ever going to get. Bill Clinton was in the White House, Tony Blair was in Downing Street and EU membership was all gain and no pain. China was a distant dictatorship with little leverage in our part of the world.
When something is too good to last, it eventually comes to an end. Brexit, Donald Trump and closer European integration have changed the dynamic in all three strategic relationships.
The rise of authoritarian China to the position of global superpower - the most significant geopolitical change since the collapse of the Soviet Union - also raises real challenges for Ireland's foreign policy posture.
Before looking at what can be done to mitigate the negative effects from each of these developments, consider Ireland's position in the EU.
Unlike other strategic relationships, it is stable and generally well-functioning. Ireland is a member country of good standing.
Sometimes excessive consensus can be bad. But the overwhelming consensus among political parties and the public that EU membership is in Ireland's best interests is positive because Ireland's interests are overwhelmingly best served by membership.
Adjustments and adaptations will be needed as the EU evolves, and the net benefits of Irish membership may have declined compared with two decades ago, but being in the union provides a rock of certainty and security in an increasingly unstable world.
This is in stark contrast to the Ireland-UK relationship. Dublin-London relations are now dire. That is largely the result of Brexit, which was always going to be a strategic nightmare for Ireland.
But a protracted deterioration in relations between any two countries is rarely entirely the fault of one side.
Too often members of this Cabinet and its predecessor have made undiplomatic remarks about Britain and Brexit which do not benefit Ireland and its citizens.
Bear-poking is not wise at the best of times. In Ireland-UK relations, these are close to the worst of times. Ministers are ministers. They are not Brexitologists or commentators on British affairs.
But something more constructive than stopping Brit-bashing is needed. Few moves could signal the importance of good relations between our countries more than rejoining the Commonwealth, now a club of more than 50 countries, including some big and important republics such as India and South Africa.
Three years ago Ireland became an observer of the French-language equivalent of the Commonwealth in order to deepen relations with francophone countries, most notably France.
The move got more coverage in the British press than it got in Ireland's. And, as this column has urged several times over the years, rejoining the Commonwealth would send a powerful signal of the importance of our relationship with Britain. It would also provide an institutional framework in which Irish and British ministers could meet, going some way to replacing the many meetings of ministers in Brussels that happened when the UK was an EU member.
Rejoining the Commonwealth would, too, send a signal to this island's minority tradition that we in the majority tradition can accept links that in some way reflect their Britishness. It could hasten reunification.
Another move that would unify the two jurisdictions on this island would be for Ireland to join a club of which Northern Ireland is already a member: the North Atlantic Treaty Organisation (Nato).
When Nato was being set up in the late 1940s, Ireland was willing to join. The diplomatically inexperienced Inter-Party government, which took office in February 1948 just as the alliance was being established, tried to use Ireland's membership as a bargaining chip over the following year. Foreign minister Seán MacBride tried to trade Irish membership of Nato for the US pressuring the British to bring about Irish reunification.
This was a serious misreading of US interests. The error was an important reason Ireland did not become a Nato founding member.
The reason the government of the day was prepared to join Nato in the 1940s was it perfectly aligned with Ireland's interests and values. The US, Canada, and European democracies - from Iceland to Italy - joined the alliance. They did so because of the very real threat posed to their democracies by the non-democratic Soviet Union, a bloc that was, incidentally, blocking Irish membership of the United Nations at that very time.
Joining Nato now would bring Ireland into the most important Euro-American institutional framework and give our diplomats and military personnel a seat at one of the most important tables in our region. It would provide a forum for interacting with the US at a time when transatlantic relations are strained.
It would show our natural allies, and others, that we no longer want to free-ride on their alliance. As a hub in the North Atlantic economy, and with the threats of major cyber attacks on the rise, being part of a defensive alliance would help make Irish citizens, businesses, civil society and the State itself safer.
It is also important to say what joining Nato would not mean. Although there is a recommendation that members spend at least 2pc of their GDP on defence, few do. Iceland, a founding member and fellow North Atlantic island, spends even less on defence than Ireland in relative terms.
Finally, China. My thinking on that country has changed over the years writing here. As recently as a few years ago, I shared the then consensus view that China's 'harmonious rise' could be a 'win-win' for both Ireland and China. I wrote that Ireland had a major opportunity to become a hub for Chinese firms in Europe, just as it had become a hub for American ones.
This was mistaken. China is increasingly acting in a manner that threatens democracies including in Europe. Nor is there any such thing as a truly private company in China. Having a large presence of Chinese companies here would bring jobs but it would also bring security risks because Beijing can and does pressure Chinese firms to act as its agents anywhere in the world.
And it is not that Beijing does not already have plenty of leverage. Ireland exports more goods to China per capita than does Germany, a global manufacturing powerhouse. The latest figures show China has become Ireland's fifth largest goods export market, and the value of those exports exceeded total sales to fellow EU members France and Spain combined. China is the seventh largest market for Irish services exports.
Closing markets, and the threat of closing them, can be used as leverage. China is not beyond using any and all levers it has at its disposal to get what it wants. Limiting the degree of economic dependency on China should quietly become an objective of Irish foreign policy.
The golden era of the early 21st century, in which all Ireland's stars aligned, is over. As one of the most open and globalised countries in the world, we face the most challenging and threatening external environment since the 1980s, when relations with Britain were strained and Ireland had to navigate an ongoing cold war as a small and relatively powerless country.
The strategic and diplomatic challenges ahead will be no less daunting than that era. Hopefully, these can be met as successfully as they were then.