King of Ireland
In 1094, Muirchertach fought the kings of Leth Cuinn and Gofraid Crobán, King of Dublin and the Isles. He went with his army to Dublin and banished Gofraid, and brought about the killing of Domnall Ua Maíl Shechnaill. He asserted supremacy over the Southern Uí Néill of the Kingdom of Meath, dividing the province between two rival clans, applying a policy of divide and rule, which had been used very effectively by his father before him.
The Irish Sea and Magnus Barefoot
Since the Kingdom of Dublin had fallen to the Irish of Leinster in the year 1052, Irish influence in the Irish Sea, particularly the Kingdom of Man and the Isles, had greatly increased. Diarmuit mac Maíl na mBó, King of Leinster and High King of Ireland, was also King of the Isles through capturing Dublin as Dublin was part of this Kingdom. Having ousted the Norse–Gael king, he was in a very powerful position. After Diarmuit's death, Muirchertach's father, Toirdelbach, became High King of Ireland and had control of Dublin. He was involved in the Isle of Man as well, more or less controlling the island, possibly through one his sons, Tadc, brother of Muirchertach, marrying a woman from the Manx royalty.
Upon Toirdelbhach's death and the accession of Muirchertach to the throne, the Manx may have used the opportunity to assert some form of independence from Irish rule, lasting until 1095, when Muirchertach was able to assert control, again through a political marriage into Manx Royalty, who had requested a king from the Irish royal bloodline. This time, the alliance was made through his nephew Diarmuit, Tadc's son, who married a Manx princess. By gaining overlordship of the Isles, Muirchertach was able to access the manpower and large naval fleets of the Isles, and he had a base from which to launch assaults on Ulster in the Hebrides, which would prove useful in his war against Domnall Ua Lochlainn.
However, this attracted the attention of the King of Norway, Magnus III, better known as Magnus Barefoot, who wanted to retain Norwegian power in the area and bring the Norse Kingdoms such as Orkney, the Isles and Dublin. With a fleet of around sixty ships and several thousand men, he re-established Norse power in the area, garrisoning the islands of Orkney and Man. Although some sources say he did want to conquer Ireland, there was not much contact between the Norwegians and the Irish, apart from an incident when three Norwegian ships were sunk by the Ulaid (who were under Muirchertach's overlordship), probably while cattle raiding in the area. Some sources do say Magnus planned a full assault on Ireland, but the Irish gathered a large army on the coast, and Magnus did not attack.
Earlier, Muirchertach had sent a fleet to Wales to help the Welsh fight the Normans who were encroaching on their territory on the island of Anglesey. However, the Normans were able to buy off the Irish ships to their side, and the Welsh were defeated. The Norman victory celebrations were interrupted by Magnus, however, who landed and routed the Norman army, reputedly shooting Hugh de Montgomery, brother of Arnulf, through the eye. Later, when the Irish fleet returned home, they were punished by Muirchertach for their treachery. After this event, Anglesey was considered the southernmost point of the Kingdom of Norway. After these campaigns, Magnus went home to Norway to campaign against Sweden, but he would return later.
In 1101, Muirchertach declared himself High King and travelled the island provinces. He is first named as High King in the Annals of Tigernach in this year. It was in this year that he gave the fortress on the rock of Cashel to the Church. He commissioned the piece of propaganda, Cogad Gaédal re Galliab, "the War of the Irish with the Foreigners" between 1103 and 1113. The work was intended to romanticize the accounts from the annals, in a bid by Muirchertach to secure the O'Brien Dynasty's claim to the High Kingship, in a time when the throne was fiercely contested by the Northern Uí Néill in Ulster and later, the Ua Conchobhairs of Connacht.
An Sligeadh Timcheall
In 1101, officially High King of Ireland and with the Church on his side, Muirchertach planned his largest and most ambitious campaign yet, called An Sligeadh Timcheall ("The Circular Hosting"). He gathered the armies of the various kingdoms, save those of Ulster, and marched northwards. The six-week long campaign began with his army marching north to the River Erne at Assaroe, then to the Inis Eoin Peninsula, burning Ardstraw and Fahan on the way. The offensive culminated with the destruction of Grianan an Aileach, an important fort of the Northern Uí Néill, in revenge for Ua Lochlainn's earlier burning of towns in Munster. Muirchertach famously ordered his men to bring back one stone from the walls of the fort for every sack of provisions they had. They marched home to Munster along the ancient route of Slige Midluachra.
For the first time during his reign, he had successfully subdued the Ulaid. The Northern Uí Néill had been severely weakened, but did not capitulate. Muirchertach would lead several campaigns against Ua Lochlainn over the next few years, but was unable to gain their submission, with the campaign almost always ending in stalemate in southern County Armagh. With the Ulaid now under his control, however, he had another angle from which to attack the Uí Néill from in the Northeast, and easier access to the Hebrides and other areas of the Isles, and parts of Scotland.