Frank Bailey joined Sarah Palin’s campaign for governor of Alaska in its earliest days, showing up at her shabby headquarters in Anchorage with a paintbrush, toilet bowl cleaner and hammer in November 2005 and becoming part of her “Rag Tag Team,” as she fondly dubbed her original inner circle. He’d grown up poor in Kodiak and worked as an airline baggage handler and middle manager. In Palin, he found a leader who elegantly fused faith and politics. She exuded charm, energy and idealism, and, most important, she inspired trust. Bailey was politically smitten: “In my mind, God had chosen her, and this was His will.”

But God had his own plan for Frank Bailey. The political novice spent nearly four years at Palin’s side only to wind up disillusioned by his “Ronald Reagan in high heels.” In “Blind Allegiance to Sarah Palin,” his political kiss-and-tell based on more than 50,000 Yahoo account e-mails that he wrote or received as a campaign and administration staffer, Bailey paints a portrait of an erratic, vindictive, unethical politician. Palin emerges as a woman far more interested in power, fame and fortune than in the day-to-day grind of governing.

“I am convinced,” Bailey writes, “that her priorities and per­son­al­ity are not only ill suited to head a political party or occupy national office, but would lead to a disaster of, well, biblical proportions.”

Written with Ken Morris, a novelist, and Jeanne Devon, an Alaska political blogger, “Blind Allegiance” will confirm what Palin’s critics already believe and will be derided by her proponents as nonsense from a disgruntled former staffer. The book’s value lies in its up-close peek into the mind and motives of a highly visible politician who manages to cloak her essence.

Bailey’s claims are hard to dismiss because they come not from a detractor but from a former “Pa­lin-bot,” as the Republican governor’s doting warriors were called, and because of the abundant insider e-mails. Not surprisingly, with lightning-rod Palin at its center, the memoir arrives amid a flurry of pre-publication controversy. A leaked draft lighted up the Internet this year, and this month, Alaska’s attorney general announced an investigation into Bailey’s use of the e-mails.

Bailey served Gov. Palin officially as director of boards and commissions and unofficially as gofer and protector. He discovered early in her campaign that his boss did not separate family and politics and that she routinely set out to destroy those who criticized her or her loved ones. Bailey’s blind devotion allowed him to rationalize her bad behavior and carry out her bidding — no matter how objectionable her demands were.

“Behaviors I had previously considered myself incapable of condoning would become acceptable and commonplace,” he writes. Although Palin promised to take the high road in politics, Bailey was forced into “an ethical limbo dance” that included making up letters to newspaper editors and signing them with the names of supporters. On another occasion, Bailey and other staffers spent hours voting repeatedly to manipulate a television opinion poll on Palin’s decision to reject part of the federal government’s economic stimulus funding.

Bailey also helped smear a neighbor who complained about excessive tourist traffic around the governor’s mansion. After hearing of the gripe, Palin sent her daughter Piper out to sell lemonade and then derided her neighbor for protesting children at play. Soon, the neighbor was portrayed on conservative blogs as “sick,” “unhinged” and “drug-addicted.”

“By the time we finished with our politics of destruction, he surely regretted ever mentioning the governor’s name,” Bailey writes. “He learned firsthand why so few people were willing to speak out against Sarah Palin.”

But the Palin “family vendetta” that consumed the author — and far too much of this book — was the scandal known as Troopergate. Bailey became a key figure in the brouhaha after a phone call he made on the matter was surreptitiously taped and made public. The crisis revolved around whether Palin fired Alaska’s public safety commissioner because he refused to dismiss a state trooper who had been involved in a messy divorce with Palin’s sister. Although the governor repeatedly denied she ever pressured the commissioner, an independent counsel concluded that she “knowingly permitted” efforts to “advance a personal agenda” in getting the trooper fired. “This saga, unfortunately, epitomized the worst of Sarah’s dysfunctional psyche and administration,” Bailey writes, “including the compulsion to attack en­emies, deny truth, play victim, and employ outright deception.”

Bailey was also dismayed by the chasm between Palin’s professed Christian ideals and her treatment of others, including supporters. During her race for governor, a highly decorated 86-year-old veteran who saw Palin as the state’s savior assembled more than 200 signs and walked house to house planting them in supporters’ yards. Bailey repeatedly asked Palin to pay the old gent a quick visit at his home, but she couldn’t be bothered.

According to Bailey, she was dismissive of those who helped catapult her to success. Several other elderly volunteers donated 10-hour days and earned Palin’s belittling characterization as the “crazy old men’s club.” One of the men, thrilled by her victory, presented her with his lucky fedora festooned with campaign buttons. “Rather than being touched by the gesture,” Bailey writes, “Sarah quickly tossed the beloved hat in the trash, explaining to me that it was ‘icky.’ ”

“Blind Allegiance” is so full of Palin’s pettiness and incompetence that it defines her as little more than a small-town politician at a loss on the larger stage. Bailey realized she was ill-prepared for political superstardom soon after she was tapped for a spot on the Republican presidential ticket with John McCain. “Incredibly, I mostly still believed in the myth of Sarah and her ultimate mission,” he writes. “However, a piece of me could see she was in over her head.”

As her soaring popularity proved, her skills lay in firing up a crowd. And, Bailey asserts, she was happy to leave knowledge of the issues to others. As governor she created an editorial team to write op-eds on her behalf, then remained detached from the proc­ess, refusing to study the issues or even familiarize herself with what her advisers turned out in her name. “She wanted credit without caring about even a fundamental understanding,” Bailey writes.

In his fervor, Bailey at first didn’t care that Palin lacked expertise — she had common sense. As she once e-mailed him, “Remember: amateurs built the ark. Professionals built the Titanic.” But Bailey came to doubt his devotion, particularly after the presidential election defeat when Palin seemed to care little for governing Alaska and far more about cashing in on her celebrity.

“Sarah hadn’t ever really been a full-time governor before being nabbed by McCain,” he writes, recalling that, before the vote, she wrote to him: “Pray that we win so we can all get out of that place.”

Throughout the memoir, as Bailey is sucked into one disagreeable act after another, he reminds the reader of how he failed to uphold his high principles: “I remained cowardly silent,” “I am disappointed in myself” and “I did something monumentally stupid.” All these bent-knee confessions, yet he stayed on to the bitter end — never resigned, never stormed out in disgust. Despite his disappointment with Palin — “the deception, anger, distrust, lies, wasted time, vendettas” — he failed to act, failed to speak out, failed to take a moral stand. Blind allegiance? Or an absence of spine? As the narrator of his own political horror story, Bailey engenders little sympathy.

Levingston is The Post’s nonfiction editor.