The dispute over ownership of the south Atlantic islands has been blowing hot and cold for several centuries

As Britain and Argentina sound off yet again about their rival claims to sovereignty over the Falkland Islands, it would not be completely fanciful to blame the Borgias for a dispute that has been blowing hot and cold for more than 300 years.

More precisely, the root of the problem can be traced to the celebrated Bulls of Donation by which the Borgia pope Alexander VI (1492-1503) exercised what medieval doctrine still told him was a God-given right to divide between Spain and Portugal all the distant lands that European navigators were starting to discover. The lines he drew (they were revised) went straight through what is now modern Portuguese-speaking Brazil, leaving most of the South American mainland to the Spaniards, whose conquistador armies had not yet arrived in Mexico or Peru.

On the Spanish side of the line, still undiscovered 400 miles off the future Argentinian coast, lay the cluster of islands that the British would name after the naval entrepreneur Viscount Falkland, and the French Les Îles Malouine after St Malo, the favoured embarkation port of predatory privateers which – like their British counterparts – attacked Spanish imperial trade for decades. The Spaniards later adapted the French name and called them Las Malvinas.

All that came later. In the 16th century Protestant monarchs such as Elizabeth I rejected the "prerogative of the pope" (the pope reciprocated, and encouraged the doomed Armada of 1588), which rested not on the rights of discovery, let alone of settlement, but on the allocation of rights to lands – empty or occupied – not yet found by European explorers, the Magellans and Drakes of the period.

Some authorities claim that a Portuguese voyage, with Amerigo Vespucci on board, first sighted the Falklands around 1500, before Ferdinand Magellan navigated Cape Horn and went round the world in 1519-20 – or that Magellan, another Portuguese, did. The British would later claim that their own seadogs, Hawkins or Davis, found the uninhabited islands in the 1590s. A Dutch voyage under Sebald de Weert named them the Sebaldines in 1600.

It is not entirely clear to scholars if any of them actually located the Falklands or other south Atlantic islands such as South Georgia. But the first recorded landing was made by an Englishman, Captain John Strong, in 1690, just ahead of the French (1701). The first settlement was established by Admiral Louis-Antoine de Bougainville of France in 1764 – five years after his commander, Montcalm, had lost Quebec – and French Canada – to the British, as the English state had now become.

Such struggles still have a bearing on the case. Spain had superseded Portugal as the dominant expansionist power, but in its slow decline battled to retain its God-given monopoly over most of the Americas against more dynamic powers, the Dutch, the British and the French.

They failed in the colder north as the British, later the rebel ex-colonial Americans, drove out their rivals: in the Mexican-American war of 1846-48 – ostensibly triggered by the Alamo massacre – the US took 1m square miles including California and Texas.

All that lay ahead. In January 1765 a British expedition took possession of West Falkland and established a base at the new Port Egmont (still there), unaware for two years that the French were settled in East Falkland. When Madrid heard about it, the two Bourbon states nearly went to war, before France accepted Spanish rights (entrenched in the Treaty of Utrecht, the one that also ceded Gibraltar to Britain) in a formal handover ceremony.

In 1770 Spain tried to enforce its claims by sending a fleet from Buenos Aires – five ships and more than 1,000 men – to which the outnumbered British surrendered. Now emerges a crucial piece of manoeuvring.

George III and his struggling prime minister, Lord North, had their hands full with the soon-to-depart 13 American colonies. According to the scholarly account of Professor DW Gregg of the Australian National University (pdf), the government in London was in a weak position, but could not back down without falling to a hostile vote in the Commons – a curious rehearsal of the drama when Margaret Thatcher's favourite, Nicholas Ridley, failed to sell a "leaseback" deal with Argentina to MPs in 1981, a year before the junta's invasion.

London insisted that the British settlement be restored (which it was), but gossip at the time – published in hostile newspapers and pamphlets, but not found in any official document – claimed that the British crown had struck a secret deal with Madrid to evacuate it "as soon as was convenient".

Either way, defence cuts – another recurring theme of the Falklands saga – ensured that the British did withdraw its forces in 1774 leaving a plaque proclaiming the islands to be the "sole right and property" of George III.

A vast doctrine of ever-evolving international law swirls around such claims. The rights of conquest of terra nullius – empty lands – was widely acknowledged, as was administrative subjugation via settlement and the imposition of order, neither acceptable since the League of Nations and, later, the UN tried to create globally enforcible rules.

As Spain's empire crumbled under the pressure of Napoleon's occupation and the march of liberal ideas – encouraged by Britain and the US in Latin America – the Spanish governor withdraw from the Falklands in 1807. The entire colony left in 1811, leaving their own version of the British plaque which they had carted off to Buenos Aires (the Brits would take it back).

Whalers, mostly from Canada and the US, would use the island's rudimentary harbours unimpeded until Louis Vernet obtained the permission of the newly independent government in Buenos Aires to re-establish a settlement in 1828, to the immediate consternation of the British, who had emerged from the long Napoleonic wars in 1815 as the world's hegemonic power, its navy master of the seas.

But it was Vernet's high-handed seizure of a US whaler, the Harriet, which he arrested and took off to Buenos Aires for infringing his rights as governor, that ushered in the British occupation that continues to this day.

Under the newly assertive presidency of Andrew Jackson, the US dispatched a warship, the Lexington, which accused Vernet of piracy and destroyed his settlement.

When the British returned in 1833-34 and finally established a formal colony in 1840, the US supported London. It was the British Royal Navy that enforced Washington's Monroe doctrine of European non-interference in the New World and no vital US interests were involved so far south. That would later change, but not yet.

The islands became a coaling station for the navy, the scene in 1914 of a revenge battle which destroyed the remnants of the German Pacific squadron as it tried to get home to its North Sea base.

The population grew steadily to a peak of 2,392 in 1931 and then declined slowly to the 1,500 who were there when the Argentininian forces landed in April 1982. Kelp, oil and greater British attention has since pushed it up to over 3,000 and helped ignite renewed Argentininian concern.

Argentina argues that the British abandoned the islands in the 1770s, never actually occupied East Falkland – site of the modern capital, Port Stanley – and did not return for 60 years. Ministers claim their own rights of succession as the heirs of Spain's empire, bolstered by the French concession in 1767.

The ancient doctrine of mare clausum by which states control the seas that protect their own borders and trade has its modern echoes, as evident the dispute between Beijing and its less powerful neighbours who each claim islands in the South China Sea.

Geography and anti-colonial sentiment in the UN tend to bolster Argentina's claims, as was evident in some quarters – even in Washington – in 1982. When peace talks failed, Ronald Reagan supported his British ally, as Jackson had done in the 1830s and Louis Vernet eventually did, possibly in search of compensation from London.

In 1982 the British taskforce that retook the islands did so under the UN charter, exercising the right of self-defence against an unpopular and brutal regime in Buenos Aires whose neighbours feared it. Feelings are very different in 2012 in a region that is richer, more confident and assertive, hence the support for the boycott of Falkland-flagged ships.

States abound with anomalies, none odder than British retention of the Channel Islands, the last remnant of William the Conquerer's Duchy of Normandy. Just a few miles off the French coast, it has survived countless wars and defeats for both sides, as well as German occupation. French names or not, the islanders seem happy to regard themselves as a British dependency. Gibraltar is another such anomaly, as are Spain's own Moroccan enclaves.

So Whitehall can play the self-determination card, also a powerful one at the UN, which recent reports suggest has some resonance among Argentinians who understand that the Falkland Islands' ingrained habits – fish and chips and all – are deeply British. A flavour of the mood can be found easily on the Falkland Islands government website here.

London says it never accepted the pope's authority over territorial disputes in Tudor times, or now.

But what about the Treaty of Utrecht? That related only to settled land, comes the reply. Discovery alone is not enough, and discovery of the Falklands/Malvinas is disputed.

Britain's early claim is strong and, if Britain abandoned the islands in 1774, so did the future Argentine republic in 1811. London has provided settlement and support without a break since 1834, including long periods in both 19th and 20th centuries when Buenos Aires' claims went quiet.

In truth, both sides have some substantial points, enough to keep diplomats busy and the military planners anxious – both sides are weaker militarily than they were. But whichever country wins the latest Battle of the Falklands, the lawyers always win.