PANAMA CITY — The directors of the Trump Ocean Club met July 28 on urgent business. They needed to fire Donald Trump.

The building’s residents and condo owners had invested in the namesake, a 70-story waterfront tower along Panama Bay, on the strength of Trump’s reputation. But during the four years that Trump Panama Condominium Management LLC had managed the property, Central America’s largest building, a team installed by the Trump family was accused of running up more than $2 million in unauthorized debts, paying its executives undisclosed bonuses and withholding basic financial information from owners, according to an Associated Press examination.

The Trumps had done all of this through fine-print chicanery, the board said. A clause in many residents’ purchase agreements prevented them from voting against the Trump company’s wishes. That allowed the Trumps to install their top employee as chairman and the residents’ representative on the board – even though the Trumps’ actual stake in the building’s residential area was merely a storage closet on the 15th floor.

The Trump Organization sent its response days later. “Your letter is a complete sham,” wrote the Trumps’ top lawyer, Alan Garten. He accused the board of ingratitude and criminal trespassing. After refusing to accept being fired, Garten declared that Trump’s company was quitting – and demanded a $5 million termination fee.

Whether wheeling and dealing with Wall Street bankers, debating political rivals or running a condo association, Republican presidential candidate Donald Trump has advanced his interests by leveraging his outsized reputation, canniness and aggression. The Trump Organization’s adventures in Panama provide a window into how these traits have filtered into his business empire – and the style of management that could be expected in a Trump White House. Transparency and close attention to expenses are not strengths. Squeezing the most from contractual language is.

Though Donald Trump lists himself as managing member in the Panama business in campaign financial disclosure documents, the company in practice is part of the Trumps’ family business. In an interview, Trump’s son Eric called the squabbling at Trump Ocean Club a minor aside in the story of how the family’s affiliation with the building created “an amazing icon and, frankly, a great testament to America.”

The power struggle at the tower shows the powerful allure of Trump’s name – and the disenchantment and separation that sometimes follow. Even that is indicative of Trump’s style: As the Ocean Club’s board was trying to settle into the administrative offices, Trump’s people cut off the office’s Internet and phone service and repossessed the office copy machine. The Trump Organization acknowledged this to the AP, saying that disconnecting services was necessary for security and privacy concerns.

Without Donald Trump, the development would not exist. But the grand ambition behind it belongs to Roger Khafif, a businessman with a prime waterfront parcel in Panama City and an aspiration to build a condominium, hotel, marina, casino and commercial center in the arcing shape of a wind-filled sail.

What Khafif lacked was the long track record as a developer needed to lure international banks and construction firms for such an expensive project.

“A lot of people were saying it was never going to be built,” said Duncan McGowan, a real estate agent and property manager who has sold units in the Trump Ocean Club since before construction began.

Bringing Trump aboard bolstered the project’s credibility with potential buyers, too.

“I am proud to develop this extraordinary high rise,” Trump said in a brochure, promising that the building would be a “landmark in Latin America and the Caribbean.”

In interviews and later legal filings, condo owners said Trump’s record as a builder persuaded them to pay deposits on their units. But despite being listed as the Trump Ocean Club’s developer in marketing materials, Trump wasn’t. His formal role was limited to branding and promoting the project with his name, though Eric Trump said the Trump Organization regularly monitored construction to make sure it met quality standards.

Even licensing Trump’s name carried a huge cost. A 2007 bond prospectus pegged Trump’s expected licensing fees alone at $75.4 million – more than a third of the $220 million total raised.

Despite a promising start to construction, cost overruns and the global financial crisis took a heavy toll. Four months after Trump joined Panama’s then-president, Ricardo Martinelli, for the building’s ribbon-cutting in July 2011, Khafif’s company defaulted on its debt. Though the bankruptcy also affected Trump’s licensing fees, court files indicate that Trump’s total payout remained between $32 million and $55 million.

Those profits make Trump the only party to the original deal to come out ahead. After emerging from bankruptcy just last year, Khafif is no longer in charge and his former company is again failing to make debt payments. Current bond prices suggest that creditors are expecting to suffer significant losses on their bonds. And despite the building’s iconic silhouette and amenities – visitors can sip drinks next to a 65th floor edgeless pool that appears to float above the ocean – most of the hotel condo units that remain under Trump’s direct management still have not been sold.

Khafif is no longer in charge of the development company that built the Trump Ocean Club, and did not respond to a phone call and email seeking comment. But neither the developer’s current management nor the project’s bondholders begrudge the Trumps’ success, said Rosella Viola, a commercial sales manager for the developer.

“Buyers buy because of the brand,” she said.

Most of Trump’s windfall in Panama came from licensing, but separate deals gave Trump a role after the project was up and running. One Trump company would run the project’s 369 hotel rooms. Another held a much smaller contract to serve as the building’s overall administrator. It was supposed to act under the guidance of the owners of the condos, office space, shops and other property in the Trump Ocean Club.

Trump was essentially a condo manager but not in the usual sense. His organization negotiated unusually broad authority, including power of attorney to represent all unsold hotel condo units and most absentee residential condo owners at building association meetings. Because many purchasers lived abroad, the proxy votes controlled by Trump’s team gave his company a decisive say over condo affairs.

Buyers learned they were granting their voting rights to Trump only when signing a lengthy final sales agreement, said Al Monstavicius, a retired Nevada doctor who bought a penthouse unit.

“I shouldn’t have signed that,” Monstavicius said. “But there was nothing I could do because my money was committed. Trump’s got smart attorneys, and he pays them well, and he takes advantage of that.”

One final move solidified the Trumps’ clout. Their company took possession of a storage closet on the 15th floor. That physical presence in the building qualified the Trump’s chief executive, Mark Stevenson, to serve as president of the owners’ board.

Trump’s company was now in full control, though few residents saw that as a problem.

“Most people were initially quite happy,” McGowan said. “The idea was, a prestigious building should have a prestigious management team.”

But a conflict of interest loomed.

Trump’s management company was owned by the same people who ran the hotel, by far the most expensive part of the building to operate. Shuffling hotel expenses to the rest of the building would make the hotel look more profitable.

Documents obtained by the AP show the Trump team charged to the common payroll hotel-specific expenses like bellhops’ salaries and hotel room safe repair. Condo owners couldn’t tell whether they were being shortchanged, because the Trumps didn’t keep separate tallies. Although Trump’s management team was contractually required to “establish and maintain segregated bank accounts” for each of the building’s components, the team never did.

Managing separate bank accounts would have added costs, the chief financial officer of the Trump Hotel Collection, Michael Straube, wrote in a 2012 letter rebuffing an owner who asked for them.

Such bookkeeping transparency took on increasing urgency given the Trumps’ failure to stay within the boundaries of its owner-approved budget. The building burned through its reserve funds two years after it began operation, incurring unapproved debts of more than $1.1 million in 2013 and again in 2014.

Eric Trump said the overspending was the result of extraordinary expenses like a broken water main and rising local labor costs.

“We made the budget, other than extraordinary things we can’t control,” he said. “We had an unbelievable team, and we managed to an internationally renowned set of standards.”

Malcolm Oscar, who bought a unit with the hope of retiring there, said: “There was always some type of explanation that was supposed to make things more palatable.”

Trump executives also appeared to award themselves mysterious bonuses. The building’s unit owners still don’t know the size of those incentives and the Trump Organization has refused to disclose them, according to members of the board.

Eric Trump told the AP the awards were appropriately authorized – but did not provide specifics of how or when such authorization took place.

Concerns about overspending and transparency boiled over at the owners’ meeting in December, after the Trump administrators announced its second million-dollar deficit. Managers at the meeting also said they would shift a greater portion of future costs to the building’s residential units.

“It was like peeling back layers of an onion – every layer you remove makes you cry,” said McGowan, the real estate agent and property manager on the building’s board. “That owners’ meeting turned into a screaming match. Civility was lost.”

A rebellion brewed among the condo owners, sparked by the proposed $2.2 million special assessment that would hit them in the spring. The dissidents, helped by McGowan, contacted condo owners scattered around the world. If enough of the building’s disparate owners designated someone other than the Trumps as their legal representative, the dissidents could overcome the Trumps’ control over the owners’ association.

When the vote came in May, all but two of the owners representing themselves opposed the Trump team’s special assessment. The building’s developer and the casino operator lined up against it, too. Against nearly unanimous opposition, Trump’s remaining proxy votes weren’t enough.

The day after residents delivered their rebuke, Stevenson resigned as both administrator and chairman of the building’s board. Another Trump employee with a board seat followed a few weeks later.

With Trump’s top man in Panama now gone, Eric Trump and higher-ranking Trump Organization executives in New York stepped in. After negotiations to lower costs stalled, the building’s newly restive board fired Trump’s management company and the senior building administration staff who reported to it. The new administration estimates those cuts alone will save hundreds of thousands of dollars a year.

Following a period of heated correspondence between the Trump Organization and the Trump Ocean Club’s board, a tense cooperation has set in. The new administration has shifted scores of employees to the Trump hotel payroll, allowing the Trumps to manage the hotel as they see fit.

“The hotel is something near and dear to our heart, something that does require real expertise,” Eric Trump said, noting that the hotel management contract runs for 40 years.

Despite the Trumps’ $5 million termination fee claim, Eric Trump said the family does not intend to sue the building’s owners collectively over what it still contends was an illegal firing. Likewise, board members such as Duncan McGowan say there is little interest in pursuing any claims against the Trumps or prolonging any feuds. The majority of the hotel condo units that went on the market in 2011 are still for sale, and it’s in everyone’s interest to get along.

“The hotel management is still Trump, and the flag is still Trump – we have no problem with Trump,” said Viola. “We can’t have international buyers thinking there are problems in the building.”

Even condo owners who expressed distaste for the Trumps’ contractual power plays agreed.

“He’s a predatory businessman,” said Monstavicius. But the Trump name stills holds allure.

“It attracted me,” he said, “and attracted a lot of other people.”