Throughout the 15 months he’s been running for president, Donald Trump’s campaign has paid private security contractors at least $432,201 for protection—$320,453 of which was spent after he was given a Secret Service detail in November 2015, according to Federal Election Commission filings.

The calculus for Trump seems simple. A public figure since the 1970s, he’s long had reason to take precautions when it comes to his safety. And now, as perhaps the most divisive major party nominee in American history, there’s more cause for concern than ever. Not to mention that being surrounded by macho former law-enforcement officials adds to Trump’s tough guy mystique.

But the size and scope of his outside security operation comes with its own set of complications and risks. He is the only nominee to be insulated by a staff of his own security and the Secret Service simultaneously, a potential cause for conflict in the ego-filled world of armed musclemen. And it’s unclear if the campaign is abiding by federal campaign-finance laws by using its funds to pay security personnel who, before his candidacy, were on the Trump Organization payroll.

“It is unprecedented,” said one high-level official with knowledge of the Secret Service machinations. “The apparatus surrounding Mr. Trump is extensive to the point of looking dysfunctional.”

And the dysfunction is glaring. The Trump campaign first told me that all questions regarding security should be directed to the Secret Service. But the Secret Service told me that Trump’s private security is considered campaign staff, and so any questions about them would have to be answered by the campaign. The campaign, informed of this, replied, “No comment.” Further requests for comment were met with a slightly wordier but no more helpful reply: “We have no comment on security personnel and procedures.”

The campaign might not want to talk about it, but Trump has contracted 11 security firms, security-guard services, and dozens of individuals as he’s campaigned around the country. And a handful of the private companies are run by retired, high-ranking law-enforcement personnel. It’s unclear if any of them are armed in their capacity on the Trump campaign.

Security can be necessary, but it also lends an appearance of legitimacy to those cocooned within it. And Trump’s preoccupation with that appearance dates back decades.

Bo Dietl, a former NYPD detective and New York media personality known for his appearances on Imus in the Morning and (until recently) Fox News, has been friends with Trump since 1985. Dietl, who looks like a cross between Yogi the Bear and Ray Liotta, maintains a private investigative firm, Bo Dietl & Associates. Their slogan: “Private eyes for a public world.”

In his midtown office in May, amid 360-views of Manhattan (an objectively more impressive view than Trump’s Fifth Avenue space, I must report), Dietl told me what it was like to provide security for one of Trump’s buildings, although he wouldn’t divulge which one. He and Trump, he said, have butted heads on occasion, but he’s always come out the other side respecting him, and now supporting his candidacy.

“I’m known for being pretty tough, so I just didn’t take any shit from him, back and forth,” Dietl said. “And the thing is, he knew where I stand. Over the years we’ve had some disagreements where I’ve cursed at him on the phone to fuck off, and back and forth, and if I caught him in a fib I’d tell him, ‘Donald, that’s not true, so stop fucking lying.’ But with all that said, when it comes down to it, I was at his wedding, [and] his son’s wedding. I became—I was one of the beginning members of Mar-a-Lago!”

Dietl said that as an executive, Trump had a certain image in mind when it came to the security he hired. “He was very demanding, very demanding,” Dietl told me, “and he wanted everything so suited the way it was supposed to be, and as far as I’m concerned he’s a demanding guy, but he wants the best and certainly you couldn’t put security people in there that look like garbage. He wanted the best looking, he wanted them to wear the best, clean, magnified, you know, nice neat uniforms, and be very respectful.

“He was, like I said,” Dietl added, “very demanding.”

He was also strategic.

According to Dietl, Trump would use him to “deter” his opponents—particularly in the lawless arena of casinos.

“I’ve handled stuff—personal issues as far as investigations and certain things,” Dietl told me, “where if he would ask me a question about somebody, say that was going after him, and then we would do our investigation and we would deter—say if someone was targeting Donald on something, and going after him, I would do some confidential investigation for him as far as to deter anybody going after Donald.”

Dietl declined to get into specifics, but used as an example “shareholders” in Atlantic City “doing something” and sending an attorney after Trump. So Trump, in Dietl’s telling, sent Dietl after the attorney.

“We kind of deterred that attorney because what we did was we investigated the fact that [the] attorney wasn’t exactly cleaner than the Board of Health, you know what I mean?” he said.

Dietl clarified that Trump had seemingly hired someone else who “must’ve followed him, put him under surveillance” to uncover “the nasty dirt—really nasty shit” that Dietl then approached the attorney with. Dietl remembered telling him, “‘Hey, if you don’t back off me, I got this on you.’ So, it was like a showdown… He hired me to get to the guy. So I went to visit the guy who was trying to fuck Trump, and I says, you know, I think you better think about this. He’s got this, this and the other thing—it was enough to be very bad for that person.”

In the end, Dietl said, the issue, “just mysteriously went away.”

Asked how often he’d deterred people for the Republican nominee in this manner, Dietl said, “Well, I’ve always been there for Donald.”

In the early stages of the Trump campaign, before the Secret Service arrived, his staff had trouble understanding how to provide security for a presidential candidate. A general election campaign, after all, is not about “deterring” one’s enemies with mafioso tactics.

Although, when it comes to Trump’s orbit, there will always be mafioso-style names. Matthew Calamari, the mustached executive vice president of the Trump Organization and longtime security official for The Donald who Matt Labash dubbed “Matty the Squid” in 1999, was tasked with designing Trump’s pre-Secret Service detail—although he’s not a campaign staffer.

Calamari consulted former Secret Service personnel, who helped explain campaign advance and security. It was Calamari, who, according to an affidavit reported by Politico, Trump delegated “full responsibility” of all security matters to. He struggled to build the team in a way that was cost effective, something which is evident from FEC filings, which show substantial and recurring payments to Trump’s private muscle.

“He has a network of retired cops that I know very well, all of them, and the retired cops are very, very professional,” Dietl said. “He runs probably one of the best security companies that I’ve ever seen as far as the people around him.”

Xmark LLC and its president, Edward “Eddie” Deck, have been paid $206,350 since October 2015. Deck is a former FBI agent who, according to the Hartford Courant, worked in the counterterrorism division. On his LinkedIn page, he claims he was a “supervisory special agent” from December 1987 to October 2011, following five years as an infantry officer in the Marine Corps.

Xmark’s logo is a silver shield with a red cross slicing through it. Amid pictures of heavily armed men pointing their weapons, the company’s website boasts that it’s “comprised of former law-enforcement professionals, consisting of FBI Agents, NYPD Detectives and NYPD ESU officers.”

The website claims the Secret Service “relieved” Xmark of its contract in “mid November of 2015.” But in December 2015 and April, May, June, and July of 2016, the Trump campaign paid Xmark $158,233.

ASIT Consulting LLC, a firm founded by former FBI Special Agent Donald Albracht, has received $27,245 from the Trump campaign. Albracht’s LinkedIn profile says he was with the FBI for 28 years, during which time he served as a “street agent” in San Diego, New York, and Kansas City in addition to working as a SWAT team leader. Before the FBI, he served for three years as a “light weapons infantryman/parachutist/SGT E-5” in the Army.

Trump has also doled out $32,880 to Gary Uher, a former FBI agent and close associate of Bernie Kerik, the former New York police commissioner who was sentenced to four years in prison for eight felony counts, including lying to White House officials.

And on the campaign payroll is KS Global Group LLC, compensated $10,000 for “security services.” The company was incorporated in Delaware in October 2015. There is little other publicly available information about it.

But Keith Schiller, a retired NYPD detective, has long handled personal security for the candidate. As Politico’s Ken Vogel noted in April, Schiller’s payments are sometimes made by Trump as in-kind donations to the campaign. And since June 2015, those payments total $149,179. The Trump campaign did not respond when asked specifically if KS Global Group LLC is Schiller’s company.

Still, Schiller’s payments from the Trump campaign pose another potential complication. Federal election law prohibits the conversion of campaign funds to personal use—meaning Trump couldn’t all of a sudden pay his longtime hairdresser with campaign cash just because his hair is present on the campaign trail.

“A security expense that Mr. Trump was incurring before running for president is an expense that did/would exist irrespective of his campaign for president and, therefore, would constitute an illegal personal use of campaign funds,” said Paul Ryan of the Campaign Legal Center.

“A strong argument could be made that using campaign funds to pay this longtime personal security guard is illegal personal use of campaign funds. However, the FEC has historically been a little more lenient with the personal use ban with matters of health and security… There might be some special circumstances for Mr. Trump, but if I were him I would have gone to the FEC for an Advisory Opinion before beginning to pay for arguably personal security services with campaign funds.

Before the arrival of the Secret Service, Trump’s security oftentimes appeared unable to function in the context of a presidential campaign. In September 2015, outside of Trump Tower, Schiller punched a protester in the face—something he admitted to in an affidavit, as reported by Politico.

Hillary Clinton, Trump’s Democratic opponent who’s had Secret Service protection since her husband, Bill Clinton, served in the White House, maintains no similar security force—just security guards for her campaign offices. “We don’t supplement Secret Service,” a spokesperson for the Clinton campaign, who did not want to be named, said. “We pay roughly the same amount as Obama did in 2012.”

After the assassination of Robert Kennedy in 1968, the Secret Service began protecting “major” presidential and vice presidential candidates.

Once a candidate requests and is granted Secret Service protection from the secretary of Homeland Security (the department has controlled the agency since 2003, when it was moved from the Treasury), the agency considers his or her safety solely their purview. Secret Service is with the candidate at all times, sweeping any venue he or she enters and securing his or her home.

Secret Service is not tasked, however, with manning campaign headquarters or offices when the candidate is not in them, which is why Trump or Clinton might feel compelled to hire their own security for their operations in Manhattan and Brooklyn, respectively.

“The Secret Service function has to take priority because at the end of the day, we are responsible for the life of the protected,” said Jonathan Wackrow, a former Secret Service agent who served on President Obama’s detail and is now the executive director of RANE Corp. “We’re always gonna take precedent.”

Secret Service, Wackrow noted, frequently coordinates with private security at venues where a candidate or president might visit—baseball stadiums, say, or high-roller fundraisers and meetings with Bill Gates—but, he said, it’s unlikely Trump’s private security is actually doing anything to protect the candidate now, despite their astronomical fees.

“I would highly doubt that they’re armed,” he said, “that poses a greater threat. Normally, standard operating procedure for the Secret Service is to never have armed security around our protectee—ever. Even working closely with sworn law enforcement officers around the protectee is a very delicate situation.”

In an emergency, Wackrow said, having armed security personnel around in addition to the Secret Service could prove dangerous. “What you never want to get involved with is what you call a ‘blue on blue’ situation,” he said, “which is when you have officers and agents pointing guns at each other.”

Wackrow added, “In my entire time with the Secret Service, I never allowed private security to be involved.”