NEW YORK — Bulgaria, the United Arab Emirates and Pakistan. An itinerary for a traveler with a flair for languages or a list of scenes for a spy thriller set during the Cold War?

Neither. It turns out they are among the countries with the best-performing stock markets in the world this year. And the success of these so-called frontier markets, mainly in Asia and Africa, has attracted U.S. investors eager to find the next set of rapidly growing countries now that Brazil and other emerging markets have fallen into a slump.

"These places might scare some people," says Russ Koesterich, global chief investment strategist at the money-management giant BlackRock. "But they're seeing some of the fastest growth in the world."

People had a similar response when investors were dabbling in emerging markets during the 1990s, Koesterich says. "Brazil and India — those used to be scary places, too."

Unlike the U.S. and Europe or even emerging markets like China and Brazil, frontier-market countries are a grab-bag group with little connection to each other. But they have a few things in common. They're small, growing quickly and some, like Kuwait and Qatar, are rich. Many of them shunned the outside world for years and are slowly opening their doors to outside investments.

Thanks to rapid economic growth, the MSCI Frontier Market index has gained 22 percent over the past 12 months. That compares with a 3 percent rise for MSCI's emerging market index, and 25 percent for the Standard & Poor's 500, the benchmark U.S. stock index.

Investing in frontier markets carries plenty of dangers. Argentina's government could decide to take over more private companies and leave investors with nothing. The war in Syria could spill into Lebanon and Jordan, upending their thriving markets. Cote d'Ivoire, Pakistan and many of the 37 frontier countries have had coups, wars and other turmoil over the past two decades.

"Buying into them has to be a long-term play," says Jack Ablin, chief investment officer at BMO Private Bank. "You have to take some leaps of faith."

The steady rise of their stock markets has apparently helped investors put aside their worries. They've dropped money into frontier market funds week after week, raising the total to $3 billion so far this year, according to EPFR Global, a company which tracks the flow of investment funds. That's triple the amount deposited in them last year and just shy of the full-year record of $3.07 billion in 2010.

Cash has streamed in so quickly that Franklin Templeton's $1.3 billion frontier fund has decided to start turning away new investors. Its top holdings include a Romanian oil and gas producer, OMV Petrom, and a batch of companies from Qatar and other countries on the Persian Gulf.

Last month, Wells Fargo's private banking group, which manages $170 billion in clients' money, took its first step into the frontier, pulling a portion of its money out of emerging-markets like Brazil, China and India and putting it into countries like Pakistan and Vietnam.

A key reason for the move was that the frontier markets are largely insulated from problems plaguing bigger countries, said Sean Lynch, the global investment strategist for Wells Fargo Private Bank.

When stock and bond markets in the U.S. and Europe were rattled by talk that the Federal Reserve would withdraw some of its support for the U.S. economy, many countries' currencies sank against the dollar. But Lynch noticed that frontier countries' currencies held up.

Why? As a group, these less-developed countries aren't as tied to the world's developed economies. Their industries are growing by selling to customers at home or nearby. Kenya's East African Breweries Ltd., for example, has most of its customers in neighboring African countries.

"They really seem impervious to what's happening on the main stage," says Ablin.

The main attraction for investors is the rapid economic growth. In theory, it should pull many people in those countries out of poverty, and as they begin to spend their higher pay on refrigerators and mobile phones, local businesses should flourish.

"A lot of them have growing populations and expanding workforces, and they don't just rely on exports of food or oil," Lynch says. "Look at Vietnam. They traditionally exported coffee, seafood and rice. Now they're making high-end machinery."

Not so long ago, these same traits lured investors to emerging markets. But after more than a decade of strong economic growth, the upstarts have slowed. Brazil, Russia and India are now closely tied to swings in global markets as well as to each other.

When China's economy slows, for instance, it drags down financial markets in Brazil, which counts China as the top customer for its exported goods.

But if a frontier market like Ghana ran into trouble, Vietnam and Kuwait wouldn't even notice.

As U.S. markets recently turned turbulent over concerns about the Fed, Ablin watched one frontier fund, the iShares MSCI Frontier 100, climb higher day after day. He recently bought a bunch of shares in the fund for his children and his BMO investment team is mulling a shift into frontier funds, too.

Still, a frontier market like Pakistan can leave some investors skittish. Osama bin Laden hid in Pakistan before he was killed in a U.S. raid in 2011. The country is often at loggerheads with neighboring India. And Pakistan has been the target of U.S. drone strikes against suspected Islamic militants near the border with Afghanistan.

Wells Fargo's Lynch and many others in the investment world argue that the good news out of Pakistan is going unnoticed. An election last month brought Nawaz Sharif to leadership as prime minister. Sharif is considered pro-business and has pledged to take on unemployment, inflation and corruption. In early July, his government lined up a $5 billion loan from the International Monetary Fund.

All of that has helped drive up Pakistan's stock market 11 percent this month. For the year, it's up 28 percent. By contrast, China's Shanghai Stock Exchange composite index has lost 10 percent this year, and Brazil's Bovespa has dropped 22 percent.

Still, a surging economy can often prove to be a dud of an investment, says Christian Deseglise, managing director at HSBC Global Asset Management.

Take China. Over the past five years, its economy has expanded by more than 10 percent on average. And over those same five years, China's stock market has lost 2 percent. Poorly-managed companies can still struggle to turn profits even as an improving economy sends them more customers.

"Some of these countries will have economies that do well but markets that do poorly, and vice versa," Deseglise says.

That's the main reason investors say they avoid staking too much on a single frontier country. It's too easy to imagine something going wrong. So, investors often buy a little of all of them, spreading their bets over Africa, Europe and Asia.