BEIJING — The money came from all over China — its wealthy southern and eastern coasts as well as the arid northwest — as thousands of people scrambled to circumvent the country’s strict controls on wealth.

In the end, more than 10,000 people had used an underground bank to effectively funnel $3 billion out of the country before the authorities put a stop to it, Xinhua, China’s state-run news agency, reported on Thursday.

The discovery of the underground bank in Shaoguan, in the southern province of Guangdong, demonstrates the furtive lengths that Chinese citizens go to in order to skirt government limits and get more of their money out of the country.

The sums involved are enormous, large enough to not only affect China’s economy but resonate around the world. Two years ago, a loss of confidence in China’s outlook led many of its people to send their money abroad — a flow that helped drive a $1 trillion drop in China’s stash of surplus foreign money. The exodus was enough to darken the country’s long-held image as a major global economic growth engine.