Just a few months ago, emerging-market stocks were soaring, driven higher by buoyant oil prices and the prospect of economic stabilization in debt-laden countries like China and Brazil.

Now, investors in the countries are starting to view 2016 as a disappointment, with the benchmark emerging-market index set to underperform U.S. stocks for a fourth straight year.

BlackRock's iShares MSCI Emerging Markets Exchange-Traded Fund (EEM) - Get Report was up 9.3% this year through Monday, lagging behind an 11% gain for the S&P 500. Since the end of 2012, the U.S. benchmark has outperformed the main emerging-market stock index by 80 percentage points.

As recently as September, the BlackRock fund was up 18% on the year. Then, a double-whammy for emerging-market stocks played out: Donald Trump was elected U.S. president, raising the prospect of a reversal of free-trade and globalization policies that helped developing countries' economies thrive during the 1990s and 2000s; and the U.S. Federal Reserve last week resumed its cycle of interest-rate increases, making foreign investments less attractive.

Now some analysts are starting to fret that the headwinds will persist into 2017.

"There's very little clarity as to what kind of policies Trump will pursue with regards to trade," said Alex Wolf, an emerging-markets economist at Standard Life Investments, which oversees about $360 billion. "If you see an increase in protectionism, or deglobalization, that's definitely a negative for emerging markets."

Since the election, international investors have yanked $18 billion from the eight biggest emerging markets, according to the Institute of International Finance. The outflows have continued for 36 straight days -- the longest stretch since at least 2005. 

While there were some big winners in 2016, including Brazil, whose main stock index gained a whopping 57% in dollar terms, and Russia, whose stocks surged 51%, there were some big losers: China, whose stocks represent the biggest component of the benchmark MSCI Emerging Markets Index, slid 17%, and Mexico lost 12%.

FindTheData | Graphiq

The U.S. election and Fed hike add to growing concerns about developments in specific emerging markets. In China, an economic slowdown has saddled the financial system with debt and a declining currency. In Brazil, hopes have faded for a quick end to the corruption scandal that led to former President Dilma Rousseff's impeachment in August. Despite this year's gains, the country's stocks have fallen by 6.2% so far in December. 

Another corruption scandal in South Korea led to the impeachment this month of President Park Geun-hye. The country's manufacturers, including electronics powerhouse Samsung, already are facing stiffer competition from Japan, where monetary stimulus has driven down the value of the yen, making Japanese exporters more competitive. Stocks from South Korea, representing 15% of the MSCI Emerging Markets Index, the second-biggest block after China, are up just 2.6% in 2016. 

And in India, the government's surprise initiative last month to crack down on corruption and counterfeiting by banning large banknotes proved poorly planned and clumsy, sapping productivity and kindling public anger as savers waited in long bank lines to swap out hard currency.

India had been one of the brightest stars among emerging markets, powered by speculation that Prime Minister Narendra Modi's government would push through sweeping legal changes that would keep the economy on a path to fast growth. 

"They clearly underestimated the risk" of the banknote ban, said Stuart Quint, an independent analyst who previously worked at the money manager Aberdeen Asset Management and brokerage firm Sanford C. Bernstein. "The political damage could potentially be pretty big, and a lot of the investment in India was based on the political reform story."

Indian shares are down 1.9% year-to-date, after an 8% slide during the past three months. The country's stocks and bonds account for about half of the outflows from emerging markets since the U.S. election. 

The underperformance for emerging markets came even as commodity prices recovered, with crude oil climbing this month above $50 a barrel from a low of $26 earlier in 2016.

The rally benefited big producers like Russia, whose stocks got a further boost from speculation that relations between the country and the U.S. will improve under a Trump administration. The ties between Russian President Vladimir Putin and Rex Tillerson, the ExxonMobil CEO who is Trump's nominee for secretary of State, are considered so deep that the relationship was satirized on the sketch-comedy show Saturday Night Live.

"The Russian economy has an improving trajectory," Wolf said. "It went through a very tough adjustment after the collapse in oil prices and is now beginning to improve."

China, meanwhile, is getting worse. The country's total debt surged to about $27 trillion this year, or 2.6 times gross domestic product, from about 1.5 times in 2008, according to the Wall Street Journal. A government effort to tamp down borrowing by raising short-term interest rates backfired last week when money managers dumped government bonds, driving up yields.

Many Chinese are spiriting money out of the country, putting pressure on the currency. And with more people taking out mortgages to speculate on real estate, there are growing fears that recent housing-price increases are unsustainable.

"You see continued rapid credit growth and what appears to be growing asset bubbles across China," Standard Life's Wolf said.

The Fed's rate increases make U.S. investments more attractive, pushing up the dollar and adding to downward pressure on the yuan. China's central bank could relieve the pressure by raising interest rates, but such a move would just increase costs for already overburdened borrowers, while curbing economic growth.

The Fed, in economic projections released Dec. 14, said that interest rates could climb to 1.4% next year, from the current range between 0.5% and 0.75%. Rates could reach 2.1% in 2018 and 2.9% in 2019.

Such a trajectory would signal the U.S. economy is strengthening and would imply further gains for the dollar -- at the expense of emerging-market currencies and stocks.

"Next year, emerging-markets are probably a market-perform versus developed equity markets, at best," Quint said. "And the risk is probably to the downside. You've got some big markets, with big challenges."