Anti-American leftist ex-President Rafael Correa will testify before Ecuadorian courts on Monday regarding his decision to sell almost half of the OPEC nation’s oil supply to China in exchange for low-price loans.

Correa’s court visit follows an embarrassing month for the world leader best known for taking Julian Assange in at an Ecuadorian embassy and enthusiastically backing the failed socialist state of Venezuela. Correa – who moved to Belgium after leaving office last year – returned to Ecuador to campaign against the reinstating of term limits for office, which would prevent him from seeking the presidency again. Ecuadorians greeted their former leader by pelting his vehicle with sticks, rocks, and rotten eggs.

The Argentine news outlet Infobae reports that Ecuadorian courts have called Correa to testify about deals with the Chinese government-owned corporations PetroChina Co Ltd and Unipec and the Thai corporation PTT International. Ecuadorian officials claim that Correa’s deals cost the Ecuadorian government, currently facing a financial crisis, millions of dollars in profit. The deals did ensure, however, that Ecuador could count on China’s political support as the nation shed democratic allies in its own neighborhood.

Prosecutors insist that Correa will testify in a “voluntary and free” manner about his decision to cut the deals while noting that they are investigating potential corruption involved in making the deals.

Ecuador’s current president, Lenin Moreno, is a member of Correa’s former party, which he only abandoned after leaving office. Despite his leftist bona fides, Moreno has challenged much of Correa’s agenda, including urging the renegotiation of these trade deals. Reuters reported in October that only one of the eight oil contracts in question is with the Thai company – the rest are with the Chinese communist regime – and that “critics have long said the cash-strapped government’s dependence on loans with increasingly onerous terms has hurt Petroecuador’s competitiveness, damaged transparency in an oil industry that accounts for half of Ecuador’s exports, and distanced the country from other creditors.”

Moreno’s government contended it can sell the oil they handed to China for billions in loans at a higher price on the free market. This week, Quito announced it had brokered new deals with PetroChina, though it has yet to renegotiate oil sales with other potential buyers.

China has spent years investing in ties in Latin America, bolstered by a wave of leftist governments coming to power in the 2000s. Xi Jinping himself has visited South America to promote business deals with Beijing in which China would provide inexpensive but high-interest loans to Latin American countries in need, allowing the governments to function while ensuring that their governments are bound to China. Correa’s government did not merely sell oil to China, but allowed Chinese companies to begin drilling in sensitive areas of the Amazon Rain Forest, triggering widespread protests.

While China’s tactics have worked more successfully in Ecuador and Brazil, it has largely had to shift away from its heavy investment in former “hot investment destination” Venezuela, whose socialist economy has turned the region’s formerly wealthiest country into a failed state. One Chinese corporation has sued Venezuela’s state-run oil company to attempt to get the destitute nation to pay.

On Thursday, Secretary of State Rex Tillerson warned Latin American nations not to take loans from “predatory” China, arguing that “unfair trading practices used by many Chinese have also harmed those countries’ manufacturing sectors, generating unemployment and lowering wages for workers.” Tillerson arrives in Mexico on Friday, shortly after the conclusion of a regional visit by Chinese Foreign Minister Wang Yi.

While Moreno leads Ecuador slightly to the right of his predecessor, Correa has returned to the country to campaign for a chance to return to power. He has taken to the public and scheduled media appearances to argue that Ecuadorians should vote “no” to term limits for presidential candidates.

Ecuadorians have responded to Correa’s return from Belgium with scorn and violence:

Speaking to Spanish newswire service EFE, Correa claimed that protesters pelted his vehicle with “rocks, sticks, eggs.” Video footage shows the car buried under refuse as protesters scramble to find more ammunition.

Moreno issued a statement in the aftermath of the attack, calling for “maintaining a spirit of solidarity, union, and hope,” but police appear to have done little to protect Correa.

Ecuadorians go to the polls to vote on presidential term limits on Sunday.