As Sheriff Joe Arpaio came down the home stretch of a long-shot effort to win the Republican nomination for Senate in Arizona, his campaign was beset by a major problem from within. Two aides he had hired appeared more interested in embarrassing one of Arpaio’s opponents than in actually winning the primary.

Those aides, Dustin Stockton and Jennifer Lawrence, had left the campaign of fellow candidate Kelli Ward under less than ideal circumstances. And when they landed with Team Arpaio, they seemed—to other staffers, at least—to be preoccupied by vendettas.

They fueled allegations that Ward was an alcoholic swinger and her husband a pedophile. There was little to no evidence for either charge. But behind the scenes, at Stockton and Lawrence’s direction, the Arpaio campaign peddled the charges to reporters.

The strategy didn’t earn much political success for Arpaio; he finished a distant third to Rep. Martha McSally in Tuesday’s primary contest.

But for Stockton and Lawrence, Arpaio’s success appears to have been a secondary concern.

“I’m disappointed that Sheriff Joe didn’t win,” Stockton tweeted late on Tuesday evening after McSally had clinched the Arizona senate nomination. “But the first mission was to undo the mistake we made legitimizing spoiled Kelli and we got it done.”

It was a remarkable admission by a campaign staffer, that he was less concerned with winning than with spurning a former employer. And it marked a fitting end to a dramatic and unusually public war of words between, in one corner, Stockton and his girlfriend, Arpaio spokeswoman Jennifer Lawrence, and Ward and her husband in the other.

Even in an Arizona primary race full of cartoonish characters—Arpaio, the infamous former Maricopa County sheriff whom President Trump pardoned of a felony contempt conviction this year; “Chemtrail Kelli” Ward, the fringe pro-Trump candidate who attacked the late Sen. John McCain hours after his death; Mike Cernovich, the Pizzagate conspiracy theorist who campaigned with Ward—Stockton and Lawrence stand out as particularly theatrical.

Theatrics, it turned out, were not what Arizona voters were looking for. Ward and Arpaio marshalled less than 50 percent of the vote combined, handing a sizable win to McSally, who will face off against Democratic Rep. Kyrsten Sinema in November’s general election.

After running Ward’s campaign early in the cycle, Lawrence and Stockton had a very public falling-out with the candidate and her husband last fall. Lawrence issued a press release laying out the reasons for their resignation from the Ward campaign. “After running her campaign, we’ve realized that our successful efforts to legitimize her campaign was [sic] a mistake,” she wrote.

Stockton and Lawrence signed on with Missouri Senate candidate Courtland Sykes, a Republican even more fringey than Ward. Then in August, they took jobs on the Arpaio campaign. Stockton proceeded to publicly air yet another set of grievances against Ward and her husband, accusing them of peddling dirt on him and Lawrence and attempting to break them up. He also suggested the Ward campaign was illegally coordinating with a super PAC supporting her campaign.

The Arpaio campaign announced its hiring of Stockton and Lawrence a day after the former’s anti-Ward twitter tirade. Lawrence sent out the emailed statement, forgetting to Bcc its recipients and publicly listing the email addresses of dozens of reporters and pundits.

Longtime Arpaio aide Chad Willems was the campaign’s general consultant at the time, and he says it quickly became apparent that Stockton and Lawrence were on a vendetta. “Immediately upon coming on board, it was clear that Dustin and Jennifer were more interested in revenge against their former employer than they were in helping Joe Arpaio,” Willems told The Daily Beast in an interview on Wednesday. “I told the sheriff that, but he wanted to give them a shot.”

Rather than promoting Arpaio, who has a dedicated following in Arizona, or going after McSally, the clear frontrunner in the primary race, Willems said Stockton and Lawrence focused their sole attention on taking down Ward. They echoed a number of their public allegations in conversations with reporters, but according to Willems, their anonymous story pitches got even more outlandish.

They “spent all their time attacking Kelli for very ludicrous things,” Willems said. “Attacking her husband for a malpractice suit and suggesting he may be a pedophile, that they were swingers, allegations of orgies of underage people, all this nonsense that didn't do anything to help Joe Arpaio.”

Willems said it soon became clear that Arpaio had not heeded his warnings about the couple. So he decided to step away from the day to day operations of the campaign. He continued fundraising, which he said was the campaign’s biggest challenge, but left Stockton and Lawrence to steer the campaign in a direction that he felt was fruitless but was nonetheless unable to stop.

“My only concern was protecting the sheriff’s reputation, and I spoke to him about these things,” Willems recalled. “I said you’d better put a leash on these dogs because they’re gonna go away when this is over, they’re going back to where they came from. You don't want your reputation damaged like that.”

Stockton naturally disagrees with much of Willems’ take, but he doesn’t dispute that he and Lawrence were in it to screw over their former employer.

“It absolutely was a personal vendetta, that’s why we started to get involved in the race,” he told The Daily Beast in an interview. Asked whether he was more determined to make Ward lose than Arpaio win, Stockton said, “I don't see why they have to be mutually exclusive. To take down Ward, the best thing we could do was to help Joe win every vote he could.”

That seems to be Arpaio’s view as well. Taking down Ward “may be [Stockton’s] goal, but it wasn’t my goal,” he told The Daily Beast in an interview. “They did focus, in a way, on her, because she was kind of a serious contender, but we also focused on McSally.” He credits Stockton and Lawrence with generating “some activity” late in the campaign. “I didn’t have [that] before, so that was the main comment I have on that.”

But Stockton admits he helped promote some outlandish attacks on Ward and her husband. The pedophilia allegations stemmed from a legal complaint against Michael Ward, which alleged Ward made a sexually suggestive joke while giving a seventeen-year-old boy a rectal exam.

Stockton himself didn’t say Michael Ward had sexually abused the child; that fell to Michael Moates, who interned on the Ward campaign under Stockton, departed around the same time with a similar chip on his shoulder, and went after the Wards on his website, DC Chronicle. Moates has repeatedly accused Michael Ward of being a “pedophile” and “sexually assaulting minors.” Stockton said he pitched that attack on Ward’s husband in discussions with reporters.

As for the video of Ward singing Grandmaster Flash’s The Message at a bar in Lake Havasu—a “swingers bar,” it claimed—Stockton said he had “no comment” on its origins or its emergence on conservative news sites including DC Chronicle.

Nevertheless, the swinging and pedophilia allegations apparently came to form a key component of the Arpaio campaign’s messaging operation, Willems said. “I had conversations with other individuals on the campaign who [said] that was going to be a new line of attack,” he recalled. “My advice to campaign staff was you better have it in black and white, because if you make allegations like that you’re not only damaging yourself in the eyes of the public but setting yourself up for a lawsuit.”

A lawsuit is reportedly brewing, but it’s slated to be filed by Stockton and Lawrence. They declined to go into detail, but said they will be taking legal action against the Wards. Stockton said he would have filed the lawsuit earlier, but his attorney advised him that doing so during the campaign would give the impression of political motives.

As for their efforts on Arpaio’s behalf, Stockton says “I think the results speak for themselves.” He pointed to a mid-August poll showing Arpaio getting 13 percent of the vote, compared to the 19 percent he received on election day. But previous polls had Arpaio faring far better, in the mid to upper 20s. Arpaio’s average showing in polls throughout the race was about 20.2 percent.

When Stockton and Lawrence joined the campaign, it was a skeleton crew, he said, with just two full-time staffers and little in the way of a persuasion operation. After Stockton joined he helped the operation staff up, and bought some robocalls promoting Arpaio. But the campaign never ended up airing radio or television ads.

Most of its efforts, Stockton said, went into fundraising—earning Willems hefty commissions on the large sums paid to his consulting firm. Stockton suggested that Willems was making bank off the campaign without providing much political value, a suggestion that Willems rejects. He points out, correctly, that the vast majority of money paid to his firm was spent on subcontracting services for the campaign.

“It’s mystifying to me that they turn around pointing fingers at me as if all of this is my fault— allegations that I stole money, or took him for a ride,” Willems said. “But that’s fine. I know the truth, the sheriff knows the truth, and these folks will disappear.”

Stockton may not disappear entirely, though. He’s already got his next job lined up. He plans to chronicle his Arizona senate saga in writings for none other than the DC Chronicle.

—With reporting by Scott Bixby