-- It came as a big surprise to the real estate industry that second homes were accounting for more than one-third of annual sales.

Before 2005, the National Association of Realtors' survey techniques failed to accurately gauge the size of this market, even though anecdotal evidence had indicated a substantial increase in second-home purchases over the previous decade.

Newly accurate or not, the percentages don't tell the whole story: Although baby boomers make up a large part of the second-home market, a growing number of foreign buyers are in it, taking advantage of a weaker dollar. And the opposite can be true, too: Many U.S. buyers are finding that the dollar purchases more in some foreign markets, especially Latin America and Eastern Europe.

The second-home market has become so large that 140,000 of the nation's more than 1.6 million Realtors acknowledged specializing in it in 2005, a 30 percent increase over 2004. A clear indicator of its importance came at the Realtors' annual meeting in San Francisco in late October, when the NAR announced a new certification program, for resort and second-home professional specialist.

When the second home can be as near as 50 miles or as far away as 5,000 from the primary residence, knowing the market is critical to an agent's success, said Maire Rosol, a Park City, Utah, real estate agent who specializes in resort sales.

"We have a lot of buyers coming here from countries that have security problems, and we are finding that these buyers favor gated communities," Rosol said. "From what they've told us, they find being able to ride a bicycle for long distances safely worth the price."

Ron Acker, principal broker at Re/Max 200 Realty in Winter Park, Fla., said agents in resort areas who are more used to selling primary homes often don't realize that many second-home buyers are looking as much for investment as for places to live.

"Don't assume this is their last home," he said. "They might sell someday."

Acker's market encompasses the area around Orlando, including Walt Disney World, and his clients are a mix of American and foreign buyers. His agents speak English and seven other languages, including Yiddish.

British buyers are typically spending $200,000 to $400,000 for houses, and most spend two to four weeks in Florida and rent out the houses the rest of the time, often to other Britons, Acker said. "The British are attracted here," he said, "by the price, the weather and the relatively inexpensive airfare" -- $600 round trip in November, though better deals are available. "Foreign buyers prefer places close to an airport that are easy to take care of."

Rosol said that the needs of the foreign buyer differ from market to market and that U.S. real estate agents "have to be aware of cultural etiquette and practices that are used in their home markets."

Panama and Costa Rica are trying to lure British second-home investors from Florida, Acker said. Their real estate associations were well-represented at the NAR convention, looking to set up cooperative deals with agents from Britain and the United States.

The recent increase in the number and intensity of hurricanes in Florida has shifted a lot of buyers "away from the ocean and to the golf course communities of the interior," Acker said.

Some of that shift can be attributed to what Steven Friedman, national director of housing at Ernst & Young, calls "the Aspen effect," meaning that when prices get high enough, "second-home owners start leaving Naples, Fla., for the mountains of Tennessee."

Meanwhile, Rosol said, 1 million Americans have retired to Mexico, Costa Rica and even emerging markets in Eastern Europe.

Buyers from abroad often capitalize on other countries' problems.

"Foreign buyers started considering Argentina when we devalued our currency and property values dropped 40 percent," said Paul Reynolds, owner of Reynolds Propiedades in Buenos Aires. "Those values have only just recovered to 1997 levels, and with airfare from Miami only $700 round trip, we are drawing in a lot of Florida investors."

Short-term rentals are popular because a fully furnished apartment in Buenos Aires averages $400 a week, while one night's stay in a comparable hotel runs from $100 to $300, Reynolds said. "Occupancy rates on these are 80 to 90 percent, so you can recover your investment. But, then again, you can buy a 220,000-acre farm in the interior for $1.5 million, so your dollar is going farther."

Mexico is becoming the biggest draw for Americans buying in foreign countries because, according to AARP magazine, "for $600 a month, retirees can live in a three-bedroom home with a gardener."

Tom Kelly, who with Mitch Creekmore wrote "Cashing In on a Second Home in Mexico," said significant changes in Mexican law offering protections for American investors created the boom.

"Americans have realized that the rates of return and appreciation" on Mexican properties exceed those in the United States, Kelly said.

Contributing to the change have been the passage of real estate licensing laws, third-party escrow and title services, and the emergence of U.S. lenders in the Mexican market.

Like the British in Florida or Philadelphians at the Jersey Shore, some second-home buyers rent out their properties part time. Christine Hrib Karpinski, author of "How to Rent Vacation Properties by Owner," said many investors rush into buying without knowing the first thing about the rental market in a particular area.

"When purchasing vacation homes, it's a given that you need to know a lot about the area where you want to buy," she said. "Included in that is knowing about strict governing rules, regulations and laws that apply exclusively to vacation rental homes."

Rental income appears to be the last thing on the minds of many second-home buyers in Manhattan.

"A lot of South Americans maintain residences for personal use, not as investment rentals," said Susan Greenfield of Brown, Harris & Stevens in New York. "They also may have places closer to home in Florida. . . . The most sophisticated buyers have larger residences in which they maintain a full-time staff."

The boom in second homes doesn't come without pain. In some resort areas, an abundance of second homes has led to a decrease in affordable housing for permanent residents, said William S. Hettinger, president and chief executive officer of Wyndham Financial Group.

"Maintaining a balance in support housing is critical to protecting the core of the community -- its residents and workers," he said.

Nor can the second-home movement probably be sustained at current levels.

"We can't do another 35 percent market share of second homes," said Ernst & Young's Friedman. "That is the peak."