When I first revealed my plan to travel all around the Irish coast in search of true-life pirate stories, many of my friends thought I’d been overdoing it on the Captain Morgan Rum down at the Admiral Benbow Inn.

You must be crazy, they said. Sure everyone knows there were no pirates in Ireland – except for Granuaile, of course. They were all out there in the Caribbean.

I can’t blame them, because I used to believe exactly the same thing. Ever since childhood, I have been fascinated by pirates. But I’d always assumed that they flourished only in tropical places with exotic names. Tortuga Island rather than Tory Island. Hispaniola rather than Hook Head. Port Royal, Jamaica, rather than Portrush, CoAntrim.

It was only recently, when I began researching my new book Ireland’s Pirate Trail (O’Brien Press) that I discovered the astonishing truth. Not only did Ireland have a plenitude of pirates, and buccaneers by the boatload…but also, for one era in history, Ireland was Pirate Central. Buccaneers arrived in large armadas and ruled over an alternative economy where the only acceptable coins were pieces of eight.

Whereas the ever-popular “Pirates of the Caribbean” thrived for a mere 70 years or so, piracy in Ireland roared unabated for at least 14 centuries of our recorded history.

As far back as 400AD, Irish pirates regularly carried out slave raids on Britain – their most famous captive was St Patrick – and nearly 1,400 years later, in 1780, privateers like Luke Ryan were still ravaging British shipping in aid of America’s War of Independence.

In the centuries in between, piracy took on many forms. In the west and southwest, the O’Malley, O’Flaherty, O’Sullivan and O’Driscoll pirate clans ruled the waves. The Viking sea raiders came to plunder and enslave, and stayed to found our capital city.

In the early 1600s, a new wave of freebooters, often based in North Africa, occupied much of west Cork and turned it into a virtual pirate republic.

Often, piracy was a valid form of political protest: no more so than in Co Wexford, where the revolutionary William Lamport (known as “the Irish Zorro”) began his career. It surprised me to learn that Oliver Cromwell described his infamous massacre at Wexford as a reprisal against the region’s politically motivated pirates.

In later years buccaneers like Anne Bonny from Kinsale, George Cusack from Meath and Peter Roach from Cork sailed west to terrorise the waters off America.

Des Ekin: many of my friends thought I’d been overdoing it on the Captain Morgan Rum down at the Admiral Benbow Inn

Intrigued by this forgotten history, I set out on a “pirate pilgrimage” around the entire Irish coast in a quest to rediscover our swashbuckling past.

It was a journey that would take me to more than 30 locations around the seaboard – from Dalkey Island in the east to Clare Island in the west, and from northerly Rathlin to Baltimore in the extreme south.

At almost every point of the compass – at places such as Wexford, Killybegs, Valentia and Carrickfergus – I uncovered stories of piracy and privateering, of captive Irish princesses and of buried treasure, that testify to Ireland’s remarkable buccaneering history.

In taking this roadtrip, my aim was to visit key locations, to talk to local people, to assimilate the atmosphere, and to visit those rare monuments that still remain. I am glad I did.

I’m glad that I actually stood on the same Wexford beach where, in 1765, four pirates buried more than 200 sacks of silver coins and gold dust they’d stolen from the merchant ship Earl of Sandwich. (Legend says that some still lies hidden there.)

It was good to hike around the Old Head of Kinsale in search of the childhood home of Anne Bonny. She was forced out of Ireland at an early age after locals were scandalised by her father’s affair with a maidservant. In Nassau she joined the pirate gang of “Calico Jack” Rackham – probably the inspiration for Disney’s Captain Jack Sparrow – and attacked shipping in the Caribbean. When she became pregnant, her unborn child saved her from the hangman’s noose.

It was humbling to travel down a narrow boreen near Newport, Co Mayo, and to stand in the shadow of Rockfleet Castle, where the vengeful armies of Galway City were decisively repulsed by the pirate chieftain Granuaile.

At Belmullet, I visited the narrow isthmus where a pirate hunter named William Monson ordered his marine commandos to carry their boats shoulder high across a quarter-mile of dry land (from Broad Haven into Blacksod Bay) in order to surprise a band of buccaneers.

In Donegal, I stood overlooking Killybegs and tried to envisage the scenes that took place there in 1627 when pirates rampaged drunkenly through the streets under the benevolent gaze of the local constable and vicar while a furious English landlord plotted to ambush the buccaneers and slash their throats.

In Dunfanaghy, I mentally time-travelled back to the day in June 1696 when the fugitive pirate Henry Avery sailed into harbour with a shipload of plunder, and took on the local customs official in an epic battle of wits.

On the Inishowen Peninsula, I climbed to the Grianán of Aileach fortress, thought to be the birthplace of an Ulster princess named Melcorca. She was enslaved by Viking pirates and taken as a concubine to Iceland. Later she encouraged her son to return to Ireland and reunite with the royal grandfather he’d never known.

As I wandered through Antrim’s spectacular Dunluce Castle – home of the piratical McDonnells – I gazed across to the Skerries Islands, which supposedly still conceal the buried treasure of a pirate named Black Tom.

Belfast Lough is replete with sea-raiding tales, from John Paul Jones’s epic battle with the British navy ship Drake off Carrickfergus, to the near-incredible story of a young Belfast lad who was captured by French pirates but managed to lock them all below decks and retake his ship.

In the final stage of my trip, back in Dublin’s College Green, I stood under a little-noticed memorial to the Ouzel Galley, a merchant ship that disappeared after leaving Ringsend and was declared lost. Five years later, it returned laden down with pirate treasure. Whether its crewmen were the victims of pirates, or were pirates themselves, was a question never resolved – and the “puzzle of the Ouzel” remains one of the most intriguing mysteries of Ireland’s Pirate Trail.