Ecuador is in the final stages of talks with a Chinese bank for a $571 million (Dh2 billion) loan, and state oil firm Petroecuador said on Friday it had signed a deal to sell oil to Chinese energy giant PetroChina. China has invested heavily in Ecuador since the Andean country cut itself off from world capital markets by defaulting on global bonds in 2008, with Beijing becoming the nation\'s chief source of external finance. Petroecuador — whose exports in May tsaid it would sell 130 million barrels of oil over a six-year period to PetroChina. That agreement was independent of previous deals that China and Ecuador have signed. In February, Quito received $1 billion from Beijing\'s state-run PetroChina in a cash-for-oil agreement. Ecuador is oil cartel Opec\'s smallest member. Article continues below Credit deals Beijing has signed credit deals worth billions of dollars with Ecuador over the last few years — a theme played out across many developing countries as energy-hungry China tries to secure natural resources. Ecuador\'s finance ministry said it planned to sign the 15-year loan worth $571 million in August with China\'s Eximbank to help fund the Sopladora hydroelectric power project.