ABERDEEN, Scotland — A local council in northeastern Scotland granted approval on Thursday to the Trump Organization to build 550 houses on pastureland and forests along a remote swath of North Sea coastline, a rare victory for the company amid declining fortunes elsewhere for President Trump’s family business.

The Aberdeenshire Council voted 38 to 24 to allow the Trump Organization’s residential development to move forward despite vocal opposition from many residents who fear it would crowd the roads and schools of their windswept village.

By winning the council’s approval, the Trump Organization is poised for one of its most ambitious foreign projects of his presidency. It is also a rescue effort of sorts for Trump’s first golf course in Europe, which has lost money each year since it opened in 2012. A second local council this week also approved the company’s plan to build a second golf course on the site.

“I’m absolutely delighted. Common sense has prevailed,” Sarah Malone, an executive vice president at the Trump Organization who oversees the Aberdeen project, told reporters after the vote. “Today’s very strong recommendation is a clear endorsement by the northeast of Scotland that the Trump development to date is already a success, and we want to build on that great foundation.”

In a sign of its confidence in Wednesday’s vote, the Trump Organization had already begun marketing the homes as part of what it called the Trump Estate, with some homes priced at more than $1.5 million.

If the Trump Organization follows through on these plans, it would turn the company into something it has not been before: a large-scale house builder. The company has built condo buildings before and sold off a few dozen houses or home lots next to other golf courses. But the company is now proposing to build a sizable suburban development, complete with the expenses of roads, streets and a school.

The outcome in Aberdeen runs contrary to the general trend for Trump’s family business. Since Trump took office, leaving day-to-day control of his company to his sons, the real estate empire’s revenue from several key properties, including his Mar-a-Lago Club and the Doral resort in Florida, has fallen.

A rare bright spot is Trump’s D.C. hotel, which has attracted business from Trump’s political allies, foreign politicians and lobbyists.

The company also has faced repeated controversies for mixing business with politics. Visiting diplomats and U.S. officials have come under scrutiny for patronizing the president’s properties. The Pentagon acknowledged spending nearly $200,000 at Turnberry, Trump’s other golf course in Scotland, over the past two years to put up U.S. Air Force crews. Trump also has proposed hosting next year’s Group of Seven conference of leading industrial nations at his resort in Doral, Fla.

On one level, the Aberdeen dispute has been about the future of a small Scottish village and comes with all the attendant not-in-my-backyard tensions. But because neighbor in question is Donald Trump, geopolitical passions have been stirred into the local brew. Amid the swirl of an impeachment inquiry and Brexit, residents of Aberdeen were handed their own chance to opine about Trump.

“My fingers are numb,” councilman Brian Topping said of the mountain of email that came his way.

Of the 2,921 households that weighed in with planning authorities, only three supported the Trump plan.

The Trump Organization’s proposal involves building 500 houses and 50 holiday cottages, plus shops, restaurants and other community facilities on its 430-acre seaside property. The development is in the village of Balmedie, a misty little burgh of about 2,500 people that could get significantly more crowded if the development comes to fruition.

Residents have blasted the plan from many directions, arguing that hundreds of new homes would clog roads, overburden schools, fail to boost the local economy, swamp sewers, harm trees and wildlife, block routes to the beach and “further devastate a once beautiful unspoiled area,” as a planning report described one line of opposition.

During Thursday’s meeting, councilors struggled to separate the normal planning process from the fact that the U.S. president was involved in this case. One councilor, Martin Ford, recused himself because of his past criticism of Trump — but not before announcing that the area’s “standing and reputation” had been damaged by association with Trump and his “incitement to violence, racism, misogyny, and environmental vandalism.”

“Mr. Ford, I think that’s wholly inappropriate,” the presiding provost scolded him. “I would ask you not to continue with that line.”

The Aberdeen course has been a contentious subject for more than a decade.

Early on, landowners fought against selling their land to Trump at the prices he offered. More recently, some hoisted Mexican flags on their property to protest the president. Trump also unsuccessfully sued the Scottish government to stop a wind farm from being built in view of his course.

For authorities, the issue this week was about what the Trump Organization wanted to build.

The Trump Organization had received approval in 2008 to build hundreds of homes as long as they also built its planned golf tourism resort, which officials hoped would enhance the local economy. The plan included a 450-room hotel, a conference center, a spa and other amenities.

That hotel has not been built and the only lodging on Trump’s property is a boutique hotel with 21 rooms. Hordes of golf tourists have so far not materialized. The golf course is closed for five months of the year during winter and is regularly blasted by inclement weather even when open.

Company executives have indicated that shifting to residential real estate is the best chance for the project’s survival.

“For long-term sustainability — this is a real estate play — we’re going to have to sell homes,” George Sorial, a former Trump Organization executive who oversaw the Aberdeen project in its early years, said in an interview earlier this year.

But by shifting to building homes instead of a big hotel, some locals believe the Trump Organization has betrayed its promise to boost the economy.

“We were promised something transformative with this development,” said Councilor Richard Thomson, who voted against the plan. “I don’t think this is it.”

The Trump Organization argued that the local economy had changed in the past decade — after the 2008 recession and the 2014 oil price collapse — and that a big hotel was no longer economically feasible.

“There is a crisis of oversupply in the northeast of Scotland,” said the Trump Organization’s Malone. “We are world leaders when it comes to building five-star hotels. You just need to look at our record. If there was a market to build a 450-bedroom hotel, we would be the first ones to do it.”

Proponents of the plan said that any new development could still provide an economic boon to the local area.

“Germany is going into recession. France appears to be in recession. Southern Europe is going into recession. And we have an American businessman who is prepared to make a multimillion- pound investment into Aberdeenshire,” said Councilor Sebastian Lane. “I think that is marvelous.”

David A. Fahrenthold in Washington contributed to this report.