Hungary borrowed €1 billion — the largest loan ever taken out by Budapest — from three Chinese banks this spring, data from the government's debt agency website revealed.

The loan, provided by the China Development Bank, the Export-Import Bank of China and the Hungarian branch of the Bank of China, was fully drawn on April 19 and must be repaid within three years.

Budapest itself did not announce the agreement. It was first reported on Thursday by Hungarian business publication Portfolio, then confirmed by the government agency.

The sizable borrowing comes as Budapest is deepening its ties with Beijing. Chinese companies, such as the electric car maker BYD or the technology giant Huawei, have so far invested a total of some €16 billion in the country, according to Hungary's Foreign Minister Péter Szijjártó.

“The loan agreement allows for the financing of investments in infrastructure and the energy sector, among others. The transaction keeps the public debt-to-GDP ratio within the ceiling at 28.9 percent,” the government agency told Portfolio Thursday morning after the publication first reported on the deal.

In May, Szijjártó also announced a raft of joint infrastructure projects with China, including a high-speed railway to Budapest airport, a freight rail line around the Hungarian capital, oil pipelines between Hungary and Serbia, and nuclear cooperation.

“We have developed a high degree of political mutual trust. Our bilateral relationship is at its best in history, and has embarked on a golden voyage,” Chinese President Xi Jinping said in a statement before his visit to Budapest in May. Weeks later, straight off the back of taking over at the helm of the rotating Council of the EU presidency, Orbán visited the Chinese capital.

With Hungary's public debt at a record high of €140 billion (73.5 percent of GDP) and a budget deficit of 6.7 percent of GDP, Budapest is in desperate need of cash. Budapest is still waiting billions of euros in EU funds.

The new Chinese loan is the highest stock in the state debt, the second of which is also a loan from China Eximbank for the Budapest-Belgrade railway project of $917 million (€877 million on the day of drawing).

While Portfolio noted the interest rate is variable, the government has not revealed any more details on the size of the interest rate, the repayment schedule or other details.