China is making its biggest bet ever on Latin America, just as the United States is turning its back.

China poured billions of dollars into Latin America in 2015.

Chinese banks sent nearly $30 billion in loans to Latin American governments last year, more than double the amount from 2014. It's also more money than the World Bank and Inter-American Development Bank gave to the region last year combined, according to the Inter-American Dialogue, a non-profit in Washington.

There's more. China offered an additional $35 billion in funds that Latin American countries could access for infrastructure projects like roads, bridges and railways. Altogether, it's China's largest investment yet.

"What we're seeing is a proliferation of Chinese finance in Latin America," says Margaret Myers, a director at the Inter-American Dialogue.

The investments come as U.S. government aid and private investment in Latin America have declined for three straight years, according to State Department data and EPFR, a research firm that tracks fund flows.

The Chinese government too has greatly expanded relations with Latin America. China hosted all Latin American presidents in Beijing for the first time last year and China's President Xi Jinping pledged to invest $250 billion in the region over the next decade.

China's exports to Latin America grew to $130 billion in 2014 from a mere $6 billion in 2000, according to IMF data. China has become the top trade partner of Brazil, Chile and Peru, surpassing the United States in recent years.

The United States still has a greater economic presence than China in Latin America. The United States' exports to Latin America in 2014 were worth three times more than those that China sent to the region. But China is gaining ground fast and chipping away at America as a superpower.

"What [the Chinese are] going for is influence -- strategic power in the region to create dependence," says Ilan Berman, vice president at American Foreign Policy Council. American "influence has steadily retracted."

Americans are certainly retracting their cash out of Latin America. U.S. investors pulled out $700 million from Latin America last year, according to EPFR.

China - Latin America eye stronger ties

There's reason to believe China will fill that investing gap even more in 2016. China, Brazil and Peru want to create a train that would stretch 3,300 miles from the Atlantic coast of Brazil to the Pacific side of Peru. That's the distance from Miami to Seattle.

"This is an extremely ambitious project," says Myers.

China increased its investment last year while its economy had its worst growth in 25 years. Meanwhile, Latin America's economy fell into recession, driven by low commodity prices and political instability in Brazil and Venezuela.

Some of China's investments were prompted by the region's problems. It loaned $10 billion to Venezuela, one of China's key sources for oil. China has loaned more money to Venezuela than any other country in Latin America. That hasn't helped Venezuela: its economy is in a severe crisis, according to its government.

Why China is growing close to Latin America:

China and Latin America fit well together despite their recent economic turmoil. China needs raw materials like iron, oil, soy and all types of food. Latin America has lots of that.

China also uses its investment in Latin America as a source of jobs for Chinese workers. Many of the infrastructure projects in Latin America that China finances come with a caveat: Chinese workers get the job.

Latin America obliges because its desperate for the investment and credit China provides.

China also holds an advantage over the U.S.: it doesn't want to intervene in politics or tell leaders how to govern. That's a stark contrast from the U.S., which has a long history of intervening in Latin American politics.

The relationship isn't perfect. China has run into many roadblocks and challenges in Latin America, forcing projects to be suspended or even canceled.

But that's not souring these budding ties.

"China underestimated challenges that it would face in the region," says Kevin Gallagher, a Boston University professor and China-Latin America expert. But "while the rest of the investment community has turned sour on Latin America, China is doubling down."