They share a border almost 1,000 kilometres long, stretching from the Mediterranean coast, up over the Awras mountains, into the Sahara.
Politically, they are closely allied. Their shared football heritage includes one of the most remarkable chapters of the game's history as a force for social mobilisation. But proximity naturally breeds sporting enmities, and Algeria versus Tunisia is a derby with bite.
The neighbours meet tonight in Rustenburg at the 29th African Cup of Nations, keenly aware that progress from the tough Group D, including Ivory Coast, is quite likely to be at the expense of a fellow Maghribi. Algeria, who maintain a Fifa ranking second only to Ivory Coast in the African ladder, carry a light tag of favourites, although reluctantly.
"This is a North African derby, so there's always special conditions," said Sofiane Feghouli, the Algeria midfielder, "and for us Tunisia are a reference in Africa, especially because of what the Esperance club have achieved."
Though Feghouli, in common with many in the Algerian squad, has spent his professional career in Europe, he knows how Algerian club football has come to envy the relative stability, wealth and continental success of the leading Tunisian clubs.
Esperance, from Tunis, have appeared in the last three African Champions League finals, and were the continent's club champions in 2011.
The balance of power either side of the frontier has always see-sawed.
Tunisia were once the pathfinders not only for the Maghreb, but for Africa and the Arab world, the first team from all of those regions to record a victory at the finals of a World Cup, 35 years ago.
The Eagles of Carthage, as they are known, beat Mexico in Argentina. To get there, they had eliminated, narrowly, Algeria's so-called Fennecs, the Desert Foxes.
Then the baton passed across the border. By the next World Cup, Algeria were readying themselves for a watershed moment, a win against West Germany, one of two victories in a group from which they narrowly failed to qualify because of a notorious, contrived result in the final game between Austria and the Germans.
The admired Algeria of Rabah Madjer and Lakhdar Belloumi would defeat Tunisia on the way to qualifying for the next World Cup in 1986. Algeria then won their first and only Nations Cup in 1990, and on home turf.
The pendulum swung back in the decade to follow, Tunisia reaching the World Cup finals of 1998 and 2006 and triumphing in the 2004 Nations Cup. Economic stability, albeit under stifling government, had yielded benefits for Tunisian football.
They staged two Nations Cups - 1994 and 2004 - in a period when Algeria could scarcely have conceived hosting such an event, beset as it was affected by violent conflict between Islamists and an iron-fisted state and a suffering economy.
Derbies always carry their baggage explicitly, aggressively.
"During those troubled times for Algeria, one of the taunts that the Tunisian players would use on the field was to raise a hand with five fingers splayed out," said Mohammed Maouche, a former coach with the Fennecs. "Why? It was a reference to the currency situation, when the Algerian dinar was sliding in value and the Tunisian dinar was doing well. The five fingers meant, 'Our money is worth five times yours!' You know how players are: some like to stoke up the rivalry to gain an edge."
But Maouche also remembers the extraordinary sporting solidarity that once bonded Tunisia and Algeria.
Back in 1958, with Algeria engaged in a bloody war of independence with France, he was among a group of leading Algerian players, then employed with clubs in the French league, who over the course of a weekend, plotted a brave, secret expedition out of France to gather in what was then a sovereign Tunisia to form a rebel "Algeria" national team, flying the colours and principles of the main freedom fighting movement, the Front de Liberation National, the FLN.
"Tunisia was our political ally for the project," Maouche said, "and from there we formed a team that would tour for the next four years, until independence, across the Arab world and to countries that supported the cause of Algerian freedom from Russia to China."
The tour would promote the revolutionary cause with huge success. It helped that among the Algeria rebels were brilliant players. Tunisians learnt that quickly.
The first matches the FLN team played, the games Algeria now regards as its first-ever internationals, were a pair of games against Tunisia.
Over the 180 minutes, the Algerians scored 15 times, the Tunisians just once.
Tonight will be a good deal more even.