Why Julian Assange turned to Ecuador for help
This year Ecuador made headlines internationally for what critics said was a government crackdown on private media.
Editorials appeared in major newspapers, including The New York Times and The Washington Post, saying that President Rafael Correa was leading a relentless campaign against free speech.
So the decision by Wikileaks founder Julian Assange to seek asylum at Ecuador's embassy in London might seem odd.
However, it does not come entirely out of the blue.
In November 2010, Ecuador's former deputy foreign minister Kintto Lucas spoke of granting Mr Assange residency in the country so he could "freely present the information he possesses".
A few weeks later, Foreign Minister Ricardo Patino and President Rafael Correa backtracked, saying Mr Lucas was speaking "on his own behalf."
At the time Mr Correa said Wikileaks had "committed an error by breaking the laws of the United States and leaking this type of information."
But over the past year and a half, Mr Assange has remained in close contact with Ecuador's embassy in London, and Mr Correa seems to have changed his mind.
'Club of the persecuted'
Mr Assange conducted an interview with President Correa in April for his TV show on Russia Today, an English language channel funded by the Russian government.
During the interview, the Ecuadorean president repeatedly praised Wikileaks and its work.
Mr Assange and Mr Correa also bonded over issues such as freedom of speech and the negative role of mainstream media.
"Cheer up! Cheer up! Welcome to the club of the persecuted!" said Mr Correa at the end of the amicable exchange, which lasted 75 minutes.
Mr Correa was initially critical of Wikileaks and argued that the leaked cables were trying to destabilise the country.
But his attitude to Wikileaks changed.
In April 2011, the government expelled US Ambassador Heather Hodges following the release of a leaked cable in which she suggested Mr Correa was aware of corruption allegations against a senior policeman when he made him commander of the national police force
Washington responded by expelling the Ecuadorean ambassador.
Diplomatic relations have since been re-established.
President Correa says he is a victim of the private media in Ecuador, which has historically served the interests of the country's economic elites.
But his actions have brought international scrutiny.
Earlier this year, Mr Correa won two separate multi-million dollar lawsuits against journalists for libel.
El Universo newspaper was fined $40m (£25m) and its owners given a three-year jail term.
In a separate lawsuit, two investigative journalists were fined $10m (£6.3m) for discrediting Mr Correa's good name in a book detailing government contracts that benefited the president's older brother.
Following international pressure, Mr Correa pardoned the journalists and the newspaper.
Mr Correa, in office since 2007 and set to seek re-election in 2013, enjoys high levels of popularity in the country.
Granting Julian Assange asylum could be a smart political move by Mr Correa ahead of the election.
It may give him a chance to clear his bad track record when it comes to the media by protecting Mr Assange, who is seen by some as a champion of freedom of speech.
But more practical considerations may also weigh on Mr Correa's mind.
"The president has to make a very hard choice and take into the account relations with the US," Grace Jaramillo, international relations professor at the Latin American Faculty of Social Studies in Quito, told the BBC.
Ecuador has a preferential trade agreement with the US on some 1,300 goods and that deal is up for renewal in January.