They are sworn enemies, but last week’s surprise visits paid by Malaysian Prime Minister Najib Razak and his loyal deputy Ahmad Zahid Hamidi to the jailed opposition leader Anwar Ibrahim in hospital have sparked chatter of a fresh twist in the country’s real-life Game of Thrones.

Both sides immediately dismissed suggestions of an entente, but the cordial demeanour of the warring leaders in photographs widely circulated on social media, as well as the timing – just months ahead of general elections – has spurred commentators to suggest there was a deeper meaning to the visits.

Zahid told reporters he and his boss “set aside politics and acted on compassion” in their separate visits with their spouses on Friday and Saturday. “I know from his body language that he took our visits well,” Zahid said.

Their visits followed shoulder surgery performed on Anwar, 70, at the Kuala Lumpur Hospital. He is serving a five-year jail term after being found guilty of sodomy in 2015, an outcome the charismatic leader says was engineered by Najib, 64, to keep him out of politics.

Interpretations of the visit have also been coloured by recent seismic shifts in political alliances.

Anwar last year declared his support for arch rival and former strongman leader Mahathir Mohamad to join the opposition, while Najib in turn has been courting Abdul Hadi Awang, the influential Islamist hardliner who until recently was vehemently anti-establishment.

Anwar’s current prison term is his second stint behind bars in two decades. Hand-picked for politics by Mahathir in the 1980s, the skilled orator was dramatically sacked as deputy prime minister by his mentor in 1998 and subsequently jailed for sodomy and corruption – charges Anwar maintains were trumped up in the same way the current premier concocted a false case against him. Upon his release in 2004, he galvanised the fractured opposition and led the bloc to two strong showings in the 2008 and 2013 general elections, ending the legislative supermajority of the ruling United Malay National Organisation (UMNO).

In name, Anwar is still the de facto leader of the opposition Pakatan Harapan alliance, but his latest jail sentence has meant 92-year-old Mahathir has held the reins since he crossed aisles last year in a bid to oust Najib over allegations of widespread corruption.

In such a fevered political landscape, described by Najib’s non-partisan banker brother Nazir Razak as akin to the HBO series Game of Thrones, even the most astute political observers have been unwilling to dismiss last week’s meeting as mere courtesy calls with no underlying motive.

“Publicly visiting Anwar Ibrahim allows Najib and UMNO to project an image of Malay unity to the masses, potentially reinforcing Malay support for the party,” said Rashaad Ali, a Malaysian politics researcher at Singapore’s S. Rajaratnam School of International Studies.

Malaysia-based analyst Ahmad Marthada Mohamed said while the visit could be a show of “Malay culture” – where the sick are cared for and visited regardless of past animosity – the optics benefited the premier.

Najib was the first to publicise the visit on social media. Anwar’s family thanked the premier for his visit on his Facebook page, but a subsequent post featuring a photograph of the visit included a poem that ended with the jailed leader’s political battle cry: “Lawan tetap lawan” (The enemy is always the enemy).

Najib’s visit gave a “positive image to the prime minister that he is a caring person who still visits his political nemesis when the latter is in hospital,” said Ahmad Marthada, a politics professor at the University of Northern Malaysia.

WHAT’S IN IT FOR ANWAR?

The shifting alliances of the past make writing off a Najib-Anwar thaw unwise, but Rashaad said he saw little upside for Anwar.

Given the fact that he is still a prisoner, the latest visit might have just been “an enforced courtesy call [rather] than a strategy meeting,” the researcher said. “Anwar cutting a deal with Najib and UMNO would cause him to lose widespread political support, both within his party and with Malaysians likely to vote for the opposition.”

Ahmad Marthada said Anwar’s family would also be a stumbling block to any such move, as they “still have grudges” over his jail terms. Of his six children, his eldest daughter Nurul Izzah is the most prominent and is among the opposition’s top leaders.

The two men have been each other’s biggest threats since Anwar’s split from UMNO.

Saiful Bukhari Azlan, the accuser in Anwar’s latest sodomy case, visited Najib in his house days before deciding to file a police report when the alleged incident occurred in 2008. Najib was then deputy prime minister.

Anwar has used this fact to buttress his argument that Najib is behind the allegations.

After his release from his first prison stint in 2004, Anwar led the charge in accusing Najib, who was also defence minister, of corruption in a deal to buy submarines, and for his links to the murder of a Mongolian model said to have known details about the deal. Najib denied connections to the case but the government declined a public inquiry.

Najib’s wife, Rosmah Mansor, was also not spared – Anwar and his supporter for years have targeted her for a supposedly luxurious lifestyle.

Anwar, known for his soaring rhetoric, moderation and support for multiracialism, then shocked Najib in the 2013 polls when the opposition won the popular vote. It lost the election on legislative seat count. His jailing for a second time in 2015 stunned his supporters.

He was initially acquitted in 2013, but on appeal the country’s two highest courts ruled he was guilty.

It remains to be seen if there are overarching common interests between Anwar and Najib for them to paper over their deep animosity and bring about yet another shake up in the country’s politics. The two were the brightest young stars in UMNO until Anwar’s sacking in 1998 split the once united Malay political elite. UMNO and its allies have ruled the majority Malay and Muslim country uninterrupted since 1957.

Joceline Tan, a pro-establishment columnist with Malaysia’s The Star newspaper, wrote this week that one person who might be nervous about the hospital visit might be the politician who precipitated that split: Mahathir. “The former premier knows Anwar too well and they do not trust each other even though they are now on the same side,” Tan wrote. There have been murmurs that Anwar is keen on retaking the reins of the opposition from Mahathir.

This could happen if Najib’s government made special provisions for the opposition leader to recuperate from his surgery under house arrest until his expected release date some time next year. General elections are due by August, but are likely to be called before the start of the Islamic holy month of Ramadan in mid-May.

“It will be interesting to see if Anwar is allowed house arrest as it will definitely undermine Mahathir in Pakatan Harapan,” said Asrul Hadi Abdullah Sani, an analyst with BowerGroupAsia in Kuala Lumpur.