For five months McGinniss rented the house next door to the Palins, where he researched and wrote portions of his book. Some derided his move as a journalistic stunt that invaded her family’s privacy; others defended his right to immerse himself in Palin’s world and argued he crossed no legal or ethical lines.

“Our summer fun has kind of been taken away from us because of a new neighbor next door who’s writing a hit piece on my wife,” Todd Palin said last year on the first episode of his family’s reality TV show, “Sarah Palin’s Alaska.”

Sarah Palin also took to Facebook to voice her dismay.

“Wonder what kind of material he’ll gather while overlooking Piper’s bedroom, my little garden, and the family’s swimming hole?” she wrote on her page.

Soon after McGinniss showed up next door, Todd Palin built a 14-foot tall fence between the two properties, and Sarah Palin posted a picture of the author on his deck, saying turnabout was fair play.

McGinniss told The Post that he could never see in the family’s windows or overhear their conversations.

“Look, this is a pain in the ass for them,” McGinniss said in May. “I understand that. If I were her, I’d be upset. I’d be annoyed. But I’d be an adult about it, and I would figure out, okay, how can we resolve this in a way that’s not going to make this into something that everybody gets obsessive about? By being here, I have learned things, and I’ve gotten an insight into her character, into her ability to incite hatred, that before I only knew about in the abstract.”

McGinniss is the author of several works of non-fiction, most notably “The Selling of the President 1968.”