Talk about prime real estate: San Juan del Sur in Nicaragua has a mile-long stretch of sand on the edge of town. John Briley

Fourteen years ago, on my first trip to Costa Rica, I agreed to check out some land a Canadian expat was selling. Zancudo Peninsula. One lot back from a rustic beach. Lush hills. Thirty grand -- or, about $29,500 more than I had. I excused myself to catch some waves, and ever since have tried very hard not to dwell on how much that parcel must have appreciated.

When I first heard "Nicaragua" and "tourism" in the same sentence about four years ago, I pictured lawless country, bombed-out roads, bandits and a gastrointestinal hit job. But the country, specifically the southern Pacific coast, kept popping up in magazines with reports of stunning beaches, surf camps, eco-lodges and even a high-end hotel with an infinity pool. Oh, and the land prices. "It's the next Costa Rica," the advance party whispered. "Get in now and you won't regret it."

To me, that sounded like a rare second chance. Yes, Nicaragua carries risk: It's the second-poorest country in the region, behind Haiti, and has a corrupt government run by the loosely hinged Daniel Ortega. But with all the natural charms of Costa Rica and an established band of expats, it seemed like a can't-miss proposition.

Over the past five years, real estate sales to foreigners have exploded along Nicaragua's southwest Pacific coast, with oceanside lots starting at about $70,000, up from $20,000 a few years ago. By comparison, similar properties in Costa Rica cost more than four times as much. Numerous American real estate firms, such as Re/Max and Century 21, operate in Nicaragua, making it easy to buy with confidence -- though scams and rip-offs occur. I swore to be diligent and slightly skeptical.

Driving out of Managua in late May, I saw a weary country. The six-month dry season had rendered the land brown and dusty. Emaciated livestock picked at shriveled weeds, shanties dotted the roadside, and desperate residents shoveled dirt into potholes, then stuck their hands out to passing cars. That Third World smell -- high-particulate exhaust blended with garbage and a whiff of sewage -- sullied the air. But farther from the capital, things looked up: children in tidy navy-and-white school uniforms skipping home for lunch; locals cruising to market by bicycle, pickup or oxcart; concrete-and-terra-cotta homes laced with bougainvillea. And the familiar Central American landscape of hills, volcanoes, streams and lakes.

San Juan del Sur, the epicenter of the real estate boom, sits on a Pacific bay at the bottom of a long hill about three hours southwest of Managua. Often described as a sleepy fishing village with an expat surfing scene, San Juan (population 13,000) was hardly dozing: It was noisy and busy, a mishmash of brightly painted homes, Internet cafes, surf shops, hotels, restaurants and pulperias (general stores) squeezed along a grid of cobblestone streets. Then, on the western edge of town, I saw the main attraction: a mile-long arc of gently sloping sand tucked between rocky bluffs and fronted by open-air, thatch-roofed restaurants. But as the old saying goes: Never buy land on an empty stomach.

* * *

After a lunch of grilled fish overlooking the near-empty beach, I dropped into the Century 21 office, a block from the center of town. David Brownlee, an agent from California, pulled up a map and pictures of Costa Dulce, a development on 55 acres of land a half-hour from San Juan.

Brownlee was personable and, at 35 years old, still young enough to be demonstrably bullish on Nicaragua without arousing suspicion. But, as if to underline the risk of Third World real estate speculation, the electricity went out in the middle of his pitch, leaving us to chat in the darkness of an afternoon thunderstorm while waiting for the generator to kick in.

"These lots are incredibly popular," he told me when the power returned. "I had a few guys from San Diego interested in one, and by the time we got back to the office it had sold." It was hard to tell what I was looking at (the color-coded master plan was vague) and even harder to tell if I was being had. (I hadn't discounted the possibility of a ruse, especially after that San Diego anecdote.) Yet, I made an appointment nonetheless to see Costa Dulce.

As I whiled away the day in town, San Juan -- and its residents -- began to grow on me. I found Brent, a 30-ish Floridian with a buzz cut, standing inside the doorway of the Arenas Caliente surf shop.

"This place rocks," said the skinny, shirtless expat. "Came down here three years ago. The only thing I really miss is my dog. We had a hurricane last year, filled the streets with water. That's when I got dengue. Lost 15 pounds. I was scared, man. My girlfriend's grandmother was next to my bed praying over me. I thought I might die. But this place rocks."

The next day, it was back to business. My pre-trip research had steered me to a development called Las Fincas, promoted as "Nicaragua's premium eco-friendly community," with 400 acres of protected tropical dry forest, a solar power system with each lot and "no clubhouses, community pools or putting greens . . . just nature the way it was intended." My kind of place.

Juan Manuel Caldera, a developer clad in jeans, a military-green T-shirt and a Panama hat, was waiting in the foyer of my hotel. He had surfboards strapped atop his SUV, on the hope that we might grab a few waves after touring Las Fincas.

Caldera grew up in Managua and after college worked as a sound man for an NBC news crew covering the contra-Sandinista war in the late 1980s. "My first week I was shot at and captured. I loved it," he said. "I got caught in a firefight between the contras and Sandinistas. I thought the car was going to explode, like in the movies, so I kept diving from one side to the other. Finally I got out by waving a white flag. The Sandinistas wanted the car to transport their wounded."

We drove south along a dirt road, through a borough called Las Delicias, where kids played by the road, goats and horses fed beneath the trees, and the aroma of rice and beans drifted from small homes. Soon we were in undeveloped hills, beautiful and densely forested. We took a ridge-top road into Las Fincas, with the Pacific flashing between jungly hillsides.

Construction had not begun. Caldera showed me a sloping acre, listed at $75,000, from where I had a pie-slice view of the ocean between two distant hills. Caldera nodded to a peninsula on the horizon: "Costa Rica," he said perfunctorily.

Nicaraguan land hawkers play up the proximity to their southern neighbor, but also issue side-of-the-mouth invectives. Caldera called it "the dark side," and Brownlee pointedly mentioned Costa Rica's high land prices and growing crime problem.

"Look," Caldera said, "the Liberia [Costa Rica] airport is only two hours away, and that's great. But they have Madonna staying at the Four Seasons [in nearby Papagayo] and all their resorts and condos and overdevelopment, and I don't think we want that here. We have a chance to do this right."

We viewed a few more lots, stumbled upon howler monkeys frolicking in the trees, and drove over a rough dirt road to Playa El Yanke, an empty caramel-colored beach. The surf was blown out, so we settled for a swim in the warm water, the hills of Costa Rica barely visible to the south.

* * *

That afternoon I met Brownlee for a tour. Of all the for-sale land I saw, Costa Dulce was the most intoxicating: a collection of lots (also undeveloped), about a quarter-acre each, occupying a moderately treed bluff between two stunning surfing beaches. Suddenly, I pictured it all: sunset surf sessions melting into cocktails in my tastefully understated home, the moon rising over the Pacific.

"Nice views, huh?" Brownlee asked. "The captain of the French junior national surfing team bought this lot right here." He was sensing the close. "He and his buddies were out here surfing a few weeks ago -- really put on a show."

The ridge-top lots with the broadest views were sold, but two attractive lots remained, and I clicked off some photos; checked the soil; asked about water, septic and cell reception; and otherwise tried to project a serious yet skeptical air.

I called Brownlee as soon as I returned to the States. "Lot 8 sold yesterday," he told me, "but Lot 10 is still available." Price? Ninety grand.

I offered less; he nudged down to $88,000. That was about $86,500 more than I had in my checking account, but doable. I could take out a home equity loan. Join a few clinical trials. Sell my neighbor's house on eBay.

The next day I wired $1,000 to the Century 21 escrow department, care of the Central Bank of Nicaragua. I then spent the ensuing week vacillating between glee and terror. Ultimately, the cooler head prevailed. Brownlee wired back my money.

I have no doubt that Nicaragua's land prices will climb steadily, and even less doubt that someone has snatched up Lot 10 and is, right now, lost in his own surf paradise daydream. Me? I'm squirreling away cash so I'll really be ready for when the "next Nicaragua" pops up on the map.

John Briley last wrote for Travel about the Big Island of Hawaii.