Image copyright Getty Images/ Reuters Image caption AOC and Ted Cruz: Political polar opposites... and unlikely allies?

Two political rivals have caused a stir on Twitter after they agreed to team up.

US representative Alexandria Ocasio-Cortez, a progressive millennial Democrat who has frequently attracted the ire of the Republicans, tweeted on Thursday that members of Congress should not be allowed to become lobbyists after their service.

Senator Ted Cruz - a conservative Tea Party Republican - wrote back: "Here's something I don't say often: on this point, I AGREE... perhaps a chance for some bipartisan co-operation?"

A few more tweets later and both sides were agreeing to co-lead a bill banning members of Congress from becoming paid lobbyists - and other politicians were also chipping in to offer their support.

Ocasio-Cortez wrote on Instagram: "Y'all I will do pretty much anything to get money out of politics. Including working with Ted Cruz if I have to. Pray for me."

Limited as it may be, US media have already described this common ground as remarkable, given how divided US politics currently is - and since the two are seen as political polar opposites.

However, strange partnerships - whether borne out of shared values, common goals or marriages of convenience - are nothing new in the world of politics.

Here are some of the world's counter-intuitive political bedfellows, what they achieved, and how things turned out for the parties involved.

Malaysia: Mahathir Mohamad and Anwar Ibrahim (2018 - present)

Image copyright Getty Images Image caption Anwar Ibrahim (left) spent many years in jail after he challenged Mahathir Mohamad (right) for a leadership position

The partnership between the two men who toppled Malaysia's former prime minister has been described as a political drama worthy of Shakespeare.

Initially, the men were allies - Mr Anwar served in Dr Mahathir's government in 1982, and quickly rose up the ranks.

However, the relationship soured after Mr Anwar launched a leadership challenge against Dr Mahathir - and was jailed on corruption and sodomy charges - which Mr Anwar always said were politically motivated, in 1999.

Years later - in 2018 - the bitter rivals teamed up to form a coalition against then-Prime Minister Najib Razak - another protégée of Dr Mahathir's - and secured a shock election victory.

As part of the agreement, Dr Mahathir said he would secure a royal pardon for Mr Anwar - and would hand over power to him after two years.

How did it go?

The partnership is still in progress - Mr Anwar received a full royal pardon shortly after the election.

He won a parliamentary seat in October, paving the way for his return to front-line politics.

Dr Mahathir has promised to step down in 2020, although, as with all politics, nothing is considered a done deal until it's done.

South Africa: Nelson Mandela and FW de Klerk (1990-1996)

Image copyright AFP Image caption Nelson Mandela and FW de Klerk (right) jointly won the 1993 Nobel Peace Prize

In 1990, South African President FW de Klerk ordered the release of Nelson Mandela, who had spent 27 years in jail.

Mr de Klerk led the National Party, which sought to protect South Africa's white minority, while Mr Mandela led the African National Congress, which demanded majority black representation in government.

Nonetheless, they agreed to work together to end Apartheid - and received the Nobel Peace Prize jointly in 1993.

Following South Africa's first multiracial elections in 1994, Mr Mandela became president, while Mr de Klerk served as one of his deputy presidents.

How did it go?

The two men had a tense working relationship - and Mr de Klerk and his party withdrew from the government in 1996 as ties between the parties deteriorated. However, they also remained on friendly terms.

Mr de Klerk paid tribute to Mr Mandela following the ANC stalwart's death in 2013, adding in a statement: "Although we were political opponents -­ and although our relationship was often stormy -­ we were always able to come together at critical moments."

UK: David Cameron and Nick Clegg (2010 - 2015)

Image copyright Getty Images Image caption Nick Clegg (left) and David Cameron led a coalition for five years - but the Liberal Democrats lost huge amounts of support

It was dubbed "Britain's hot new bromance" - as David Cameron, then leader of the Conservative Party, and Nick Clegg, leader of the Liberal Democrats at the time, agreed to form a coalition government after the UK had its first hung parliament in decades.

Their joint press conference was dubbed a "love-in" in the "rose garden" - a contrast from the past, when Mr Cameron once responded to a question about what his favourite joke was with the answer "Nick Clegg".

The two parties differed on some pretty fundamental things - Europe, human rights and tuition fees - but argued that they were teaming up to provide a stable government to fix the economic deficit.

How did it go?

The coalition lasted the full five years - against many expectations - and delivered several policies, including pensions reform and same-sex marriage.

But the Liberal Democrats suffered badly, as their supporters grew angry at increased tuition fees and austerity measures undertaken by the coalition government.

In the 2015 elections, 49 Lib Dem MPs lost their seats - taking the party down from 57 to just eight members in the House of Commons, while the Conservatives secured a majority and stayed in government.

Northern Ireland: Ian Paisley and Martin McGuiness (2007-2008)

The Troubles in Northern Ireland was one of the most intractable conflicts of the 20th Century. A lasting political solution to end the sectarian violence that marred the country for decades seemed implausible.

Against all odds, that calculus changed in the 1990s. Unionists and nationalists entered into peace talks, resulting in the landmark Good Friday Agreement.

Years later, Ian Paisley of the Democratic Unionist Party (DUP) and Martin McGuinness of Sinn Fein would head a power-sharing government in Stormont.

Image copyright Getty Images Image caption Ian Paisley (L) and Martin McGuinness (R) served as first and deputy first minister

One was a former IRA commander; the other once denounced the Pope in the European Parliament as the Antichrist. Yet the pragmatic and genial working relationship that followed belied their differences.

In 2007, they assumed office as first and deputy first minister of the power-sharing executive, marking a new era of reconciliation between old enemies.

Often pictured laughing and joking together, their public friendship earned them the nickname "The Chuckle Brothers".

How did it go?

Their first months at the helm of the Stormont executive was said to have been cordial and civilised. Their joint leadership, however, did not last long.

Mr Paisley stood down as first minister of the Northern Ireland Assembly and leader of the DUP in 2008. He later claimed he was pushed out by senior DUP figures who were unhappy with his leadership, not least his cosy relationship with Mr McGuinness.

Nevertheless, their friendship continued, transcending politics. When Mr Paisley died in 2014, Mr McGuinness said "the peace process and I have lost a friend".

Paisley's widow Eileen said in 2015 that Mr McGuinness had been very supportive to the family during her husband's long illness.

"His friendship with Martin McGuinness had meant something very special to him," she said.

What about friendships?

Given that compromise is part-and-parcel of politics, perhaps it's the genuine friendships across political lines that are even more remarkable.

Image copyright Getty Images Image caption Antonin Scalia and Ruth Bader Ginsburg's friendship even inspired an opera

Republican Senator John McCain was famously friends with many Democrats, including Joe Biden, despite them running on rival presidential tickets in 2008.

While giving an emotional eulogy at Mr McCain's funeral, Mr Biden said: "We understood the same thing: All politics is personal. It's all about trust. I trust John with my life... and I think he would trust me with his."

And one of the most surprising friendships was at the Supreme Court - between liberal Justice Ruth Bader Ginsburg and conservative Justice Anthony Scalia.

The two fought on same sex marriage, the constitution and voting rights, and frequently wrote sharp critiques of each other's legal opinions.

Yet they were friends for decades, sharing New Year's Eve dinners, a love of opera and even once, famously, riding an elephant together in 1994.

Following Justice Scalia's death in 2016, Justice Ginsburg said: "We were best buddies. We disagreed now and then, but when I wrote for the Court and received a Scalia dissent, the opinion ultimately released was notably better than my initial circulation... it was my great good fortune to have known him as a working colleague and treasured friend."

BBC Crossing Divides

A season of stories about bringing people together in a fragmented world.