This Central American country, known mostly for the bustling canal that bisects it, has found a downside to its surging economy: It has built too many offices and hotels. Panama’s growth as Central America’s banking capital and its aggressive recruitment of multinational companies with tax breaks made it a magnet in recent years for foreign investors.

Wealthy people and companies in countries like Colombia and Venezuela have seen Panamanian real estate as a stable place to stash capital. Driven by this demand, Panamanian developers have nearly tripled Panama City’s high-end office market since 2009. They expanded its stock of hotel rooms by roughly 61% in 2012 and 2013 together, according to Lodging Econometrics.

As a result, Panama City’s office vacancy rate has risen to 33.6%, the highest in Latin America, and could go as high as 45% by 2016, according to brokerage JLL. Lease rates for all but the best towers have declined by as much as 30% since 2012, the firm says.

Meanwhile, the country’s average hotel occupancy has fallen to 49.9% in the first 10 months of this year from 72.5% in the same period of 2008, according to Smith Travel Research. In turn, nightly rates have declined by 28% in that span to an average of $108.80.

Property owners and investors in Panama now anticipate several years of office floors sitting vacant and hotel rooms going unused. Many predict Panama’s burgeoning economy will take up the slack, but not for at least another two years, if not longer. Others are watching for owners to start selling hotels on the cheap and for desperate landlords to cut office lease rates further, meaning still cheaper rates for travelers and office tenants alike.

“Too many people started building the same thing without talking to each other,” said Herman Bern Sr., whose family firm, Emprasas Bern, has developed 130 commercial and residential projects in Panama since he founded the company in 1978. “Just greed and optimism. It was like, ‘If you are doing it, it must be something good. So I’m going to do it, too.’ ”

Panama’s overbuilding stands as a cautionary tale for other markets whose relative stability is coveted by foreign investors. Latin American investors, for example, have shown a ravenous appetite for condominiums in South Florida, where developers have announced plans for roughly 40,000 condos since 2011, representing a potential 32% expansion of the existing stock, according to market research firm CraneSpotters.com.

Panama’s appeal is obvious. Its growth in gross domestic product has led Central America for several years, with an 8.4% expansion last year, according to the World Bank Group. The government’s waiver of many taxes for multinational firms has lured scores to establish regional headquarters here, including Johnson & Johnson , Caterpillar Inc. and Procter & Gamble Co. The country, which has a population of 3.9 million people, is lifting its profile with a $5.25 billion widening of its namesake canal to allow larger ships.

Panama also is attractive to investors because it operates on the U.S. dollar. Developer Fernando Araujo, a former Colombian minister of foreign affairs whose Colombian company is constructing the 285-room Las Americas Golden Tower hotel in Panama City, says he is using the dollar’s relative stability, compared with other Latin American currencies, in his efforts to sell half of the units to outside investors at $200,000 for a standard room.

So far, 140 of the hotel’s rooms have been sold to investors, roughly half of whom are Colombian, with the balance coming from other South and Central American countries. “Colombia’s economy is doing very well, but Panama’s is doing better,” Mr. Araujo said. Mr. Araujo is widely known for being held hostage for six years by leftist rebels in Colombia, escaping in 2006.

The construction boom in Panama also is being driven by a practice known as “strata” investing, in which investors buy floors within towers. Popular in many emerging markets, the practice mitigates risk for developers and provides ample capital.

But it also can stoke overbuilding, which eventually saps the returns of investors through vacancy and declining lease rates. “There was a buying spree, a mood,” said Simon Hafeitz, a partner at one of Panama’s largest developers, Desarrollo Bahia. “Everyone knew there were people coming from outside [investing] into Panama, so they moved ahead” with construction.

Consider the F&F Tower in Panama’s downtown banking district. Completed in 2012, the 540,000-square-foot building is among Central America’s most striking, with a window-sheathed, corkscrew design spiraling up 52 floors. Developer Saul Faskha ’s F&F Properties has sold the entirety of the building, half to Panamanian investors, a quarter to Venezuelans and the rest to others across the globe. It is 62% leased, and lease prices have declined by up to 10% since the building opened.

“I am not concerned, because the customers like the most advanced and newest buildings,” Mr. Faskha said in an email. “That’s why I’m under construction of two more.”

Others don’t foresee a quick recovery for the office market. “There’s probably seven to 10 years of inventory at the reported absorption rates,” said Alex Petrosky, an executive overseeing the Panamanian real-estate portfolio of Inversiones Bahia, the investment vehicle of the country’s Motta family.

Similar pain may hit the hotel market, where the building boom has brought several global brands to Panama City in recent years, including Starwood Hotels & Resorts Worldwide Inc. ’s Westin and W; Hilton Worldwide Holdings Inc. ’s Waldorf-Astoria; and InterContinental Hotels Group PLC’s Holiday Inn and Crowne Plaza. Some owners see hope in ongoing expansions of the country’s convention center and international airport.

But the steep drop in occupancy and rates in Panama City means several hotel owners will see operating costs exceed revenues. Few hotels likely will close, but some may be sold on the cheap by cash-strapped owners.