US President Donald Trump (L) and China
US President Donald Trump (L) and China's President Xi Jinping leave a business leaders event at the Great Hall of the People in Beijing on November 9, 2017. Donald Trump urged Chinese leader Xi Jinping to work "hard" and act fast to help resolve the North Korean nuclear crisis, during their meeting in Beijing on November 9, warning that "time is quickly running out". / AFP PHOTO / Nicolas ASFOURI (Photo credit should read NICOLAS ASFOURI/AFP via Getty Images)
PHOTO: Nicolas Asfouri/AFP/Getty Images
Now playing
01:10
Trump, China agree on 'phase one' trade deal
A split of Chinese President Xi Jinping and US President Donald Trump.
A split of Chinese President Xi Jinping and US President Donald Trump.
PHOTO: Getty Images
Now playing
02:06
Trump administration dials up US-China tech tensions
NEW YORK, NEW YORK - NOVEMBER 24: People walk past the New York Stock Exchange (NYSE) on November 24, 2020 in New York City. As investor
NEW YORK, NEW YORK - NOVEMBER 24: People walk past the New York Stock Exchange (NYSE) on November 24, 2020 in New York City. As investor's fear of an election crisis eases, the DowJones Industrial Average passed the 30,000 milestone for the first time on Tuesday morning. (Photo by Spencer Platt/Getty Images)
PHOTO: Spencer Platt/Getty Images
Now playing
02:20
Chinese firms face delisting threat
Screengrab Ant group
Screengrab Ant group
PHOTO: CCTV
Now playing
02:35
Chinese government halts Ant Group's giant IPO
In this photo taken on September 5, 2020, people wearing face masks walk in a shopping mall in Wuhan, China
In this photo taken on September 5, 2020, people wearing face masks walk in a shopping mall in Wuhan, China's central Hubei province. - China is recasting Wuhan as a heroic coronavirus victim and trying to throw doubt on the pandemic's origin story as it aims to seize the narrative at a time of growing global distrust of Beijing. (Photo by Hector RETAMAL / AFP) / TO GO WITH AFP STORY HEALTH-VIRUS-CHINA-DIPLOMACY-WUHAN,FOCUS BY DAN MARTIN (Photo by HECTOR RETAMAL/AFP via Getty Images)
PHOTO: Hector Retamal/AFP/Getty Images
Now playing
02:13
China expected to be the only major economy to grow in 2020
HONG KONG - 2019/04/06: In this photo illustration a Chinese online payment platform owned by Alibaba Group, Alipay, logo is seen on an Android mobile device with People
HONG KONG - 2019/04/06: In this photo illustration a Chinese online payment platform owned by Alibaba Group, Alipay, logo is seen on an Android mobile device with People's Republic of China flag in the background. (Photo Illustration by Budrul Chukrut/SOPA Images/LightRocket via Getty Images)
PHOTO: SOPA Images/LightRocket/LightRocket via Getty Images
Now playing
02:40
How China's Ant Group built a $17 trillion payments machine
In this photo illustration, the WeChat app is displayed in the App Store on an Apple iPhone on August 7, 2020 in Washington, DC.
In this photo illustration, the WeChat app is displayed in the App Store on an Apple iPhone on August 7, 2020 in Washington, DC.
PHOTO: Drew Angerer/Getty Images
Now playing
03:00
Why Trump's war on WeChat could hurt American businesses
A pedestrians walks past HSBC signage in the Admiralty district of Hong Kong on July 31, 2017.
HSBC said on July 31 pre-tax profit for the first half of 2017 had risen five percent to 10.2 billion USD compared with the same period last year, in what it called an "excellent" result following a turbulent 2016. / AFP PHOTO / ISAAC LAWRENCE        (Photo credit should read ISAAC LAWRENCE/AFP via Getty Images)
A pedestrians walks past HSBC signage in the Admiralty district of Hong Kong on July 31, 2017. HSBC said on July 31 pre-tax profit for the first half of 2017 had risen five percent to 10.2 billion USD compared with the same period last year, in what it called an "excellent" result following a turbulent 2016. / AFP PHOTO / ISAAC LAWRENCE (Photo credit should read ISAAC LAWRENCE/AFP via Getty Images)
PHOTO: Issac Lawrence/AFP/Getty Images
Now playing
03:31
HSBC may have to choose between China and the West
Concept illustration released on Aug 23, 2016 by the lunar probe and space project center of Chinese State Administration of Science, Technology and Industry for National Defence shows the concept portraying what the Mars rover and lander would look like. China
Concept illustration released on Aug 23, 2016 by the lunar probe and space project center of Chinese State Administration of Science, Technology and Industry for National Defence shows the concept portraying what the Mars rover and lander would look like. China's planetary exploration program has been named Tianwen, or Quest for Heavenly Truth, the China National Space Administration announced on Friday.
PHOTO: Illustration/Handout/Xinhua/CNSA
Now playing
03:22
Mars is the latest arena in US-China rivalry
A government advertisement (C) promoting Chinas planned national security law is displayed on the city hall building in Hong Kong on June 29, 2020. (Photo by ISAAC LAWRENCE / AFP) (Photo by ISAAC LAWRENCE/AFP via Getty Images)
A government advertisement (C) promoting Chinas planned national security law is displayed on the city hall building in Hong Kong on June 29, 2020. (Photo by ISAAC LAWRENCE / AFP) (Photo by ISAAC LAWRENCE/AFP via Getty Images)
PHOTO: ISAAC LAWRENCE/AFP/AFP via Getty Images
Now playing
02:53
Hong Kong's business world divided over national security law
PHOTO: Photo Illustration: Shutterstock / CNN
Now playing
02:50
The moral dilemma of doing business in China, explained
BEIJING, CHINA - OCTOBER 27: A Chinese soldier stands guard in front of Tiananmen Gate outside the Forbidden City on October 27, 2014 in Beijing, China.  (Photo by Kevin Frayer/Getty Images)
BEIJING, CHINA - OCTOBER 27: A Chinese soldier stands guard in front of Tiananmen Gate outside the Forbidden City on October 27, 2014 in Beijing, China. (Photo by Kevin Frayer/Getty Images)
PHOTO: Kevin Frayer/Getty Images
Now playing
01:56
China censors a lot, from Winnie the Pooh to the NBA
Now playing
01:32
Huawei and 5G: What's at stake
SHANGHAI, CHINA - SEPTEMBER 17: Alibaba Chairman Jack Ma speaks during the opening ceremony of the 2018 World Artificial Intelligence Conference at West Bund on September 17, 2018 in Shanghai, China. The 2018 World Artificial Intelligence Conference is held on September 17-19 in Shanghai. (Photo by Zhao Yun/VCG via Getty Images)
SHANGHAI, CHINA - SEPTEMBER 17: Alibaba Chairman Jack Ma speaks during the opening ceremony of the 2018 World Artificial Intelligence Conference at West Bund on September 17, 2018 in Shanghai, China. The 2018 World Artificial Intelligence Conference is held on September 17-19 in Shanghai. (Photo by Zhao Yun/VCG via Getty Images)
PHOTO: Zhao Yun/VCG via Getty Images
Now playing
03:02
How Jack Ma changed China
PHOTO: Yum China
Now playing
01:43
Why American fast food chains will do anything to win in China
Now playing
01:51
What you need to know about Tencent
(CNN Business) —  

Beijing is stepping up the battle to stop money flowing out of China as the country contends with economic woes and trade war tensions that have eased but show no sign of ending altogether.

Money was leaving the country at a record clip earlier this year through unauthorized channels, according to analysts. That’s bad news for China, which needs to keep financial reserves high to maintain confidence in its markets.

Now Chinese officials are trying harder than ever to avoid a repeat of the financial scare four years ago that sapped its money reserves by hundreds of billions of dollars.

The State Administration of Foreign Exchange, a key government regulator, said Sunday that its most important job next year is to prevent major financial risks, avoid “abnormal” capital flows across its borders and crack down on illegal trading activities.

“We need to fight a critical battle” to defuse financial risks and maintain market stability, SAFE said in an statement.

The pledge was an unusually strong one for the agency, which deployed the kind of military language more often used by top leaders in China.

Cracking down

The agency has already started cracking down on capital flight. In November, it fined Chinabank Payments $4.2 million — one of the largest-ever fines SAFE has imposed — for moving money overseas. The regulator didn’t say how much had been transferred, but it could have been tens of millions of yuan because China calculates fines based on the amount of money in question.

The online payments firm, a subsidiary of billionaire Richard Liu’s JD.com (JD), told CNN Business that the transfers were made by “external merchants” who had taken advantage of loopholes. But it said it felt “deeply sorry” and would reflect on its management.

Major corporations aren’t the only ones linked to the flight of money out of China. Earlier this month, a Bank of China (BACHF) customer took out $50,000 in cash from his bank account over the course of a week. SAFE fined the bank nearly $6,000 for breaking a government rule limiting how much foreign currency people can take out of their accounts within a short period of time.

While the amount was small, it still symbolizes how far the government is willing to go to crack down on such withdrawals.

“Controls on outflows are increasingly tight,” said Alicia Garcia Herrero, chief economist for Asia Pacific at Natixis Bank.

Fleeing money

The threat of fleeing capital stems from concerns about the country’s economy, which has been hurt by cooling domestic demand and a prolonged trade war with the United States.

The People’s Bank of China also allowed the yuan to weaken, a way to help the country to counter the impact of higher US tariffs on its exports. Since the trade war began last year, the currency has depreciated by around 12% against the US dollar.

A weaker currency, though, raises the risk that people will try to move money out of the country, which in turn threatens to drive the yuan’s value even lower.

The Chinese government has been able to stop some money from leaving. About $74 billion left China through regulated channels in the first half of this year — the smallest amount in a decade, wrote Gene Ma, head of China research for the Institute of International Finance, in an October report.

Even so, a record amount of funds have left China through “unrecorded transactions” during that time, he said. The Washington-based trade group estimates that $131 billion left China in the first six months of 2019 — the most recent data available — through “hidden capital outflows.” (People can move money through such means, for example, by asking friends and family to pool the annual limit on foreign currency they are allowed to withdraw from Chinese banks, or by claiming to make investments overseas that don’t really exist.)

Ma wrote that the surge was triggered by “intensifying trade tensions.”

China has also been trying to help its economy by cutting benchmark interest rates, which will likely increase the amount of money leaving China, said Herrero, the Natixis Bank economist.

And while China and the United States recently agreed to a “phase one” trade agreement that could cool tensions between the two countries, Herrero said that deal isn’t likely to alleviate the pressure on China entirely.

She said the yuan’s respite might be “temporary,” adding that China’s central bank will likely let the currency depreciate again if the deal is not signed, or is eventually watered down.

Lessons learned

China has good reason to keep its money in the country. The last time China experienced this kind of capital flight was in 2015 and 2016, when the economy faltered and the People’s Bank of China suddenly devalued the yuan, roiling global financial markets.

On average, the amount of money leaving China was equivalent to 6% of the country’s GDP in each of those two years, according to an estimate by the Chinese Academy of Social Sciences, a government think tank. In total, China lost $1.28 trillion, and it was forced to tap into its foreign exchange reserves to prevent its currency from rapidly depreciating even further.

China’s foreign reserves shrank by more than $800 billion in those two years before recovering some losses in 2017. Since then, Beijing has significantly tightened control of capital and made it more difficult for people to exchange money for foreign currency or transfer funds abroad.

“Chinese regulators have learned their lessons during the frightening period of 2015-16,” analysts from Bank of America wrote in November.

Analysts at UBS also pointed out that China has taken steps to offset capital flight. They noted earlier this month that the country recently opened up its financial markets further to attract foreign investors and companies. Those kind of measures can boost interest from foreign investors in the Chinese market and attract more money within the country’s borders.