VENEZUELA — It was the sort of celebration that’s become rare in troubled Venezuela: a lavish destination wedding of two young entrepreneurs at a dude ranch on the country’s vast tropical plains, a region known for its rugged cowboys on horseback rounding up cattle — and where camps like this one cater to the nation’s ever-diminishing elite.

Over three days, guests, including a former Miss Universe, wealthy landowners and others among Venezuela’s 1 percent, emptied bottles of expensive whiskey, herded water buffalo on horseback and stomped their feet to the sound of a popular country music crooner.

“This is not the real Venezuela,” a waiter noted at one point during the back-to-back partying.

But even at this destination reserved for the wealthy in a nation in the throes of economic crisis, reality intruded, at least for a while. A local children’s hospital was in disrepair, and the couple and their guests began by painting its crumbling walls.

“Hosting a celebration amid these circumstances is obviously tough, but that’s why we did the work at the hospital,” said the groom, Juan Jose Pocaterra, the 32-year-old co-founder and CEO of Vikua, a startup tech company whose name means “Quality of Life” and that Forbes magazine has called one of Latin America’s most promising.

“For Juan and for me, who are entrepreneurs, it was very important to have this wedding here because we’re betting on Venezuela,” added 33-year-old bride Maria Fernanda Vera, the founder and CEO of Melao, a fashion company, who grew up in this region known as the “llanos.” ″We believe in Venezuela’s reconstruction.”

The oil-rich, once-prosperous nation, is reeling from the worst economic crisis in modern Latin American history. Some 3 million people, or nearly 10 percent of the population, have left the country to escape hunger, violence and hyperinflation. Basic medicine is lacking. Many who remain cannot afford bare necessities on salaries that average $6 a month.

In an acknowledgment of that reality, as the events began on a Friday, about 50 guests joined in to help stencil white diamond-shaped patterns on the bleak blue walls of the children’s hospital in the nearby city of Acarigua.

The activity, organized with the help of the Venezuelan NGO Tracing Public Spaces, “is a way to contribute amid so much suffering,” Pocaterra said, as his bride, who regularly contributes powdered milk and other supplies to the hospital, nodded.

As night fell, though, any reminders of the humanitarian crisis gripping the nation disappeared.

The guests gathered under a full moon at a hacienda on the property. Some donned helmets and saddled horses for a game that involved herding water buffalo into a pen as the rest of the guests watched safely from a distance. Waiters in bow ties passed around cold beer and grilled chorizos as a band played “joropo,” fast-paced folk music performed with a harp, maracas and a four-string guitar. Decked out in a cowboy hat, 72-year-old crooner Joel Hernandez serenaded the bride and groom to the strains of “llanera,“ the region’s traditional country music.

Many guests wore T-shirts designed by the bride’s fashion label that read “La Tierrita,” — the Little Land — a reference to her heritage on the vast savanna that spans much of central Venezuela from the Orinoco River to the Andes. It’s a region of exotic birds, caiman and capybara, as well as the birthplace of the late President Hugo Chavez, who often used to claim he was born there in a mud hut.

To be sure, though, any talk of Chavez, or his hand-picked successor, President Nicolas Maduro, was not welcome with this crowd, which included landowners whose property had been expropriated by the socialist government, as well as opposition politicians, and a student leader who nearly lost an eye in anti-government protests. Many of the couple’s close friends did not make it because they, like many well-healed Venezuelans, were now living abroad in places like Miami, Madrid and other cities with large Venezuelan expatriate communities in Europe and South America.

Talk turned to Juan Guaido, the 35-year-old opposition leader who had declared himself interim president in January in a move quickly recognized by the United States and some 50 other countries, and who, for this group like many Venezuelans, offered the first hope for regime change in decades. Sitting at long wooden tables, some half-jokingly wondered not if — but when — US Marines would arrive.

The next morning, the guests awoke in rustic log cabins to the chirping of birds — and a slight hangover. After a breakfast of traditional stuffed corn-patty arepas, the day’s events included wall climbing, horseback riding, swimming and bocce ball. In the grassy fields, workers slaughtered a cow and a pig to grill on a stake, and set up a stage worthy of a rock concert.

Then came the lakeside wedding. Women in flowing summer dresses fanned themselves with delicately painted folding fans as they held pastel-colored parasols to shield themselves from the sun. Men wearing white shirts, suspenders, bow ties and beige pants donned Panama hats provided to the guests. Among the bridesmaids was 2009 Miss Universe Stefania Fernandez.

Maickel Melamed, a Venezuelan motivational speaker known for his TED Talks and marathon running despite suffering muscular dystrophy, officiated, joining the couple on a wooden pier to the sound of the Beatles’ “Here Comes the Sun” and Disney’s “A Whole New World.”

As the sun set over the lake, Melamed asked the guests to close their eyes and “make a wish for the homeland that we all long for.”

Back at the ranch, the partying began and the Johnnie Walker Black flowed. Some lined up for a buffet of beef, pork, yucca and cachapas, the sweet-corn crepes filled with rich white cheese popular in Venezuela. More than 110 pounds of cheese were brought in for the event. Others hit the dance floor until past 4 a.m.

For a politically active former Miss Universe, it was the first time back home in years.

In 2014, Fernandez joined other celebrities, artists and sports figures in a campaign called “Gagged in Venezuela” to protest restrictions on freedom of expression. She posed wearing a crown, her face blackened and appearing bloodied, a rope tied around her mouth. Soon after, she said, she lost all her modeling and other contracts and left the country. After some time in Miami, she now lives in Colombia.

“The decision to come here wasn’t easy,” she said. “I feared facing Venezuela’s reality, and it’s much cruder. There’s more hunger and more poverty. But today, there’s also hope.”