The President of Catalonia, Pere Aragonès, travelled to Dublin this week with the aim of strengthening ties with Ireland.

A relaxed but confident character, the 40-year-old told me that he was "very interested" in the political process which delivered the Good Friday Agreement, and how that might be applied back home.

Bordered by France to the north and the province of Valencia to the south, Catalonia has a population of more than seven million and its capital, Barcelona, is the second largest city in Spain.

It enjoys regional autonomy within the Spanish state, and has its own government and president.

However, the political push in Catalonia is for complete independence from Madrid.

President Aragonès' delegation had hoped to hold a meeting with a member of Government here but it didn't happen.

"We have offered the Irish Government to have a meeting. That has not been possible for now. So we respect, obviously, the decision," he said.

Such an invitation must have presented Dublin with a diplomatic dilemma - principally: should our Minister for Foreign Affairs hold a meeting with a regional leader from another EU member state who is seeking independence?

So, I asked Mr Aragonès what reason he was given by the Department of Foreign Affairs.

"Agenda problems. But we respect it. We are working to the future to have these meetings and to build a stronger relationship," he said.

President Aragonès is a lawyer, an economist and very media savvy.

As I probed further - suggesting that the Irish position could be viewed by the Catalan side as a diplomatic snub - he adroitly suggested, with a smile, that my questions would be better directed to Iveagh House.

President Aragonès said he was 'very interested' in the political process which delivered the Good Friday Agreement

The Department of Foreign Affairs had not replied to my questions by the time of publication.

The Catalonian president is no stranger to Ireland. He spent successive summers as a teenager living with families in Bishopstown in Cork to take English language classes. He remembers how he would walk past Cork University Hospital to get to school.

He may have been young at the time but was already politicised.

"Walking through Cork I saw all of the posters of the Easter Rising. And I asked: what was this about? And when I discovered the struggle for independence of Ireland, it reminded me of the situation in Catalonia," he said.

There's a strong link between Ireland's revolutionary past and that of Catalonia, where the hunger strike of Cork's Lord Mayor, Terence McSweeney, became a cause célèbre.

As McSweeney was dying in Brixton prison in October 1920, a Catalonian workers' collective, the Autonomous Centre of Employees Of Commerce And Industry, wrote to British Prime Minister Lloyd George to say "all Catalonians" wanted the Irish patriot released due to his "heroic" and "sublime" campaign.

The success of the current Northern Ireland peace process is something that President Aragonès wants to learn more about, given he’s in what could best be described as preliminary talks with Madrid about how an independence referendum could be framed.

He met former Taoiseach Bertie Ahern on Thursday for talks about the evolution of the process and the current impasse over the Northern Ireland Protocol.

More significantly, he met Sinn Féin leader Mary Lou McDonald and Northern Ireland’s First Minister designate Michelle O'Neill on Friday.

Mary Lou McDonald (L) and Michelle O'Neill

The president expressed an affinity with Sinn Féin.

"They have some proposals which are very similar with proposals and measures that we are promoting as the Catalan government," he said.

Mr Aragonès says it's a "long-standing" relationship, and he's interested not just in Sinn Féin's approach to uniting Ireland but also how their policies extend to social issues such as housing.

How Catalonia would like to overcome those social problems gets to the core of their independence issue: the president wants tax revenues in Catalonia to stay in Catalonia.

"There are transfers from Catalonia to the rest of Spain that account for 8% of GDP annually.

"And given the situation in Catalonia, with one quarter of the people at risk of poverty, we need most of this money to finance our social policies," he said.

The president argues that autonomy within the Spanish state simply isn't enough for the people of Catalonia.

The counterpoint, of course, is that Madrid will always be incredibly cautious given the absolute certainty that any new concessions given to Catalonia will inevitably be followed by similar demands from the Basque region.

Mr Aragonès likens the autonomy which has been offered in the past to an accordion. The Spanish constitution, approved in 1978, allowed the Catalans to expand their powers and competences; however, by the 1990s, things went into reverse with a recentralisation policy adopted by Madrid.

This metronome, back-and-forth, was familiar to Catalans: in 1931, when Spain’s monarchy fell and a republic was declared, autonomy was granted to Catalonia; it was reversed after the election of 1933; granted again in 1936; and then extinguished by General Franco at the end of the Spanish Civil War.

Further evidence, according to Mr Aragonès, of the inadequacy of this style of autonomy, are attacks on the Catalan language.

While a policy of 'linguistic normalisation’ means that Catalan is taught in schools, the language does not have official status across Spain. So, for example, the language of the legal system is Spanish.

This explains why Mr Aragonès was keen to meet with Conradh na Gaeilge during his visit. He’s also campaigning for Catalan to become an official EU language - as Irish did in 2007.

A march for independence in October 2017

I asked him if it makes sense for Catalonia to be seeking independence from Spain when further European integration was inevitable. After all, the EU's founding treaty speaks of "ever closer union".

"We want to be Catalonia, a new state - within Europe ... it's what makes sense for us," he replied.

That said, he recognises that Catalonia is currently repairing its relationship with the EU institutions, having experienced "difficulties" following the tumultuous independence referendum of 2017.

That took place on 1 October, in the face of total opposition from the government in Madrid, with more than 90% of those polled voting for independence. The significant qualification is that the turnout was only 43%.

It's argued by some that had the government in Madrid offered a stronger autonomy deal, and not deployed heavy-handed police action against what it described as an illegal referendum, the outcome could have been materially different.

Instead, the referendum and its aftermath were marked by violence, recrimination, arrests and detention.

Today, Mr Aragonès frames the issue in softer terms. He says the campaign for independence "is not a project against anyone but in favour of the Catalan people".

The president outlined the contribution that he feels Catalonia could make to the "common challenges" which all EU member states face: energy, power systems, research, science and innovation.

That said, he accuses the Spanish government of seeking to "monopolise the relationships" with other EU member states and to exclude Catalonia from such discussions.

In the past two years, the Spanish government has been engaged in renewed but tentative talks with the Catalan government.

It seems the progress has been modest and has included the release of nine Catalonian independence activists.

"It's a medium-term process. What we need to do is to strengthen our position inside Catalonia - to have a broader majority in favour of independence. Some progress has been made during the past two years - especially in terms of ending the repression. [But] not all the repression has ended," Mr Aragonès said.

The campaign for independence "is not a project against anyone but in favour of the Catalan people"

A personal issue which the president has had to overcome is that "elements" within the Spanish intelligence service had been tapping his phone, via Pegasus spyware, for a year. Shrugging his shoulders, he said that when you're trying to "build a new country ... you have to assume this could happen".

I asked him if he ever questioned his push for Catalan independence given that his grandparents came from the southern Spanish region of Andalucia. He replied that identity for him is about looking to the future and not the past.

Mr Aragonès told me that the desire for Catalan independence is here to stay.

"My office in Barcelona sits on the same place, the same building, that has been the headquarters of the Catalan government since 1400," he said.

Undoubtedly there has been some progress recently in the talks between Madrid and Barcelona but the fundamental problem remains.

Mr Aragonès expressed it this way: "In Catalonia we want to decide our future by a democratic process, but the Spanish government rejects the idea of Catalonian people deciding the future of Catalonia".