By Saumya Vaishampayan, Lingling Wei and Carolyn Cui

HONG KONG -- A crackdown by the People's Bank of China on wagers against the yuan propelled the currency to its largest-ever two-day gain against the dollar, highlighting the rising tension in foreign-exchange markets over the outlook for China.

The yuan soared 1.2% on Thursday in Hong Kong to 6.7869 against the dollar, its highest since early November, after the Chinese central bank tightened liquidity in its most widely traded offshore market. The currency strengthened 2.5% over the past two sessions. The Hong Kong interbank offered rate, which measures overnight lending rates that banks charge one another in that market, soaredto 38% on Thursday, the highest in a year.

Analysts and investors attributed the swings to factors including the central bank's desire to punish short sellers by pushing up the cost of betting that the yuan will fall, a position that has become increasingly popular in markets as China's growth slows and its debt burden rises.

"The PBOC is again sending a strong signal to markets that the yuan's value remains under its control and that it will forcefully resist any one-way bets developing against the currency," said Eswar Prasad, a professor at Cornell University and a former head of the International Monetary Fund's China division.

The central bank's actions rippled through global markets on Thursday, prompting investors to sell many investments that have grown popular in recent months. The Dow industrials dropped 79 points to 19683 and the yield on the 10-year U.S. Treasury note fell 0.08 percentage point to 2.36%, while thedollar declined against the euro and yen.

The value of the Chinese currency and the pace of capital outflows from China rank among the most closely scrutinized trends in financial markets. Many investors view a disorderly slowdown in China's economy as one of the chief risks to global economic-growth expectations for 2017.

Borrowing costs for offshore yuan have been rising in recent months as the pool of the Chinese currency in Hong Kong continues to shrink. Beijing has stepped up efforts to stem capital outflows by imposing stricter rules on foreign-exchange transactions, as an expected increase in the value of the dollar as the Federal Reserve raises interest rates stands to place more downward pressure on the yuan.

Fears that China would sharply devalue the yuan helped fuel six weeks of global market mayhem at the start of 2016. In that episode, as well in September 2015, the Chinese central bank intervened in both onshore and offshore markets by buying up the yuan through state-run banks, traders said at the time.

"The risk to China in 2017 is the same risk it faced in 2016, which is a strong dollar," said David Loevinger, a managing director at TCW Group and a former Treasury coordinator for China affairs.

Many analysts view China's economy now as healthier than it was then, thanks to a global economic upturn, but fears of a confrontation over trade and currency policy with the Trump administration have added a new source of anxiety.

Declines in the yuan, also known as the renminbi, have taken the currency near 7 to the dollar, a level that traders view with trepidation because it marks a sharp decline from the yuan's value only a few years ago.

To bet on a drop in the yuan, investors often "short" the currency -- borrowing yuan in Hong Kong, swapping them for dollars and later swapping them back at a more-favorable rate. As the cost of borrowing yuan rises, so does the cost of that trade. That can force investors to exit by buying back yuan in Hong Kong, driving the currency higher.

"It's quite expensive to go short the renminbi," said Colin Harte, a multiasset portfolio manager at BNP Paribas Investment Partners in London.

By midmorning Thursday, banks in Hong Kong had fully tapped a 10 billion yuan pool of intraday funding provided by the Hong Kong Monetary Authority, the city's de facto central bank. Two other yuan-funding pools were also heavily used -- "reasonable given the tight market liquidity," a monetary authority spokesman said, adding that authorities would continue to closely monitor the offshore yuan market.

Analysts say Beijing still faces a struggle to arrest the yuan's descent. Businesses and individuals concerned about domestic asset bubbles and the uncertain outlook for China's economy are looking for returns outside the country.

"It doesn't change my long-run outlook for a weaker Chinese currency," said Jens Nystedt, an emerging-markets portfolio manager at Morgan Stanley Investment Management in New York.

Over the past year, China's central bank has periodically sought to boost the yuan in the Hong Kong market by instructing Chinese banks in the city to withhold funds. The resulting liquidity shortage raises the cost of wagering against the currency. Economists and officials say yuan liquidity in Hong Kong became tighter again in the past couple of days as a result of the central bank's efforts to discourage bearish bets on the Chinese currency.

"The tightened policies are aimed at defeating those hoping to pile on bets against the renminbi," said a government adviser, referring to the central bank's most recent moves.

Chinese authorities have upped their efforts to stem the outflow of yuan in recent weeks with measures that include controls on outbound investments by Chinese companies and tighter rules on Chinese residents' converting yuan into foreign currencies.

The result has been fewer yuan in Hong Kong and a higher overnight yuan borrowing rate: Above 10% since Dec. 30, it soared to 38.3% Thursday from 16.95% Wednesday, the highest since a record 66.8% last Jan. 12.

This week China's central bank has also been setting the yuan's official daily "fix" against the dollar at stronger-than-expected levels.

Within mainland China, where the People's Bank of China limits yuan movement to 2% above or below a level it sets daily, the yuan rose 1% to close at 6.8817 to the dollar, its strongest since Dec. 8.

"I have no doubt that this is going to be a continued battle between market forces on the one hand and the PBOC on the other," Mr. Prasad said.

Write to Saumya Vaishampayan at saumya.vaishampayan@wsj.com, Lingling Wei at lingling.wei@wsj.com and Carolyn Cui at carolyn.cui@wsj.com

(END) Dow Jones Newswires

January 05, 2017 14:06 ET (19:06 GMT)

Copyright (c) 2017 Dow Jones & Company, Inc.