China agreed to provide Venezuela a $5 billion credit line in return for future oil payments ahead of socialist dictator Nicolás Maduro’s visit to Beijing, the country’s finance minister announced on Wednesday.

Minister Simon Zerpa told Bloomberg News the two countries had agreed on a “strategic alliance on gold mining” ahead of Maduro’s visit to Beijing, where he is seeking funds to help ease the pressure of the country’s devastating economic and humanitarian crisis.

“I am going with great expectations and we will see each other again in a few days with big achievements,” the Maduro said on Wednesday in a state broadcast from Caracas airport. Just days before the visit, Maduro also celebrated the life of Chinese dictator Mao Zedong, describing him as a “great Chinese revolutionary” who “dignified the people of the countryside.”

China’s Foreign Ministry confirmed that Maduro was traveling at the invitation of Chinese Communist Party leader Xi Jinping.

“Recently, the Venezuelan president has actively pushed forward economic reforms, and there has been a positive reaction to these from society,” ministry spokesman Geng Shuang said at a daily press briefing. “I think that a Venezuela that is steadily developing is in everyone’s interests. China has faith that the Venezuelan people and government will be able to handle its domestic affairs with the legal framework.”

“This visit by President Maduro is beneficial to both sides’ mutual trust, to push forward cooperation, to expand ties between the two countries and to promote Venezuela’s development,” he continued.

Maduro’s apparent success is somewhat surprising given China’s frustration with the regime’s inability to pay back its debts. In June, Spanish newspaper El País revealed that Chinese banks refused to loan money to Venezuela throughout 2017 over concerns that Maduro was mishandling the economy.

Last December, one of China’s largest state-owned companies filed a lawsuit against the Venezuelan state-run oil firm Petroleum of Venezuela (PDSVA) over a failure to clear their debts. Chinese state media has warned that any investments in Venezuela are “at the cost of great risk” and Chinese banks should reconsider business there. China has long seen Venezuela and other Latin American countries as ideal places for predatory lending and expanding its overall influence.

In May, reports revealed that Xi Jinping refused to congratulate Maduro on his victory in that month’s fraudulent election, dismissing the event as a domestic matter. State propaganda outlet Global Times wrote in an editorial on Wednesday that the “two sides [will] forge ahead despite hardships.”

“Venezuela’s ongoing economic reform and transformation have brought new opportunities for the two sides to tap into cooperation potential, expand fields of cooperation and achieve common development,” the article reads. “Chinese enterprises will follow the principle of win-win cooperation and help Venezuela come out of the economic morass through pragmatic cooperation toward economic prosperity and social stability.

Follow Ben Kew on Facebook, Twitter at @ben_kew, or email him at bkew@breitbart.com.