Turkey’s coffers received a vital influx of cash from China in the midst of an election campaign in June, Bloomberg reported on Friday.

The $1 billion worth of funds transferred by China’s central bank was the biggest ever support package sent by the country to Turkey, Bloomberg said.

It arrived as Istanbul geared up for a rerun of its mayoral election. The first result was annulled after the ruling Justice and Development Party (AKP) objected to the close-run victory in the first race in March of the opposition candidate, Ekrem İmamoğlu, citing concerns of fraud. İmamoğlu repeated his success with a far larger margin on June 23.

“The inflow marks the first time Turkey received such a substantial amount under the lira-yuan swap agreement with Beijing that dates back to 2012, according to a person with direct knowledge of the matter who asked not to be named because the information isn’t public”, Bloomberg’s report said.

The business news site noted that the cash had come at a crucial time for Turkey, when the decision to rerun the election had sparked investors’ concerns about the country’s political stability, adding to long-running concerns about its economy.

Turkey has been grappling with an economic downturn since 2018, when a currency crisis wiped away 28 percent of the lira’s value against the dollar. High inflation, unemployment and debt have been among other concerns about the country’s economy. The central bank reportedly sold large amounts of its foreign currency reserves in spring to keep the lira afloat.