Behind every US president is a team of Secret Service officers, highly trained to protect the highest office in the land. And behind those Secret Service officers are dogs. More often than not, the president doesn’t even see these canine protectors.

“The dogs who sniff out explosives arrive at a destination well before the president arrives and typically remain in the background while the president is present,” writes Maria Goodavage in her new book, “Secret Service Dogs: The Heroes Who Protect the President of the United States.”

“The dogs who protect the president physically tend post covertly.”

The Secret Service will not reveal the number of dogs in all its programs, due to operational security concerns. But unlike military dogs, which sniff out explosives and do patrol work, all the dogs involved in the Secret Service have a singular focus.

There are the emergency response team (ERT) dogs, basically the Secret Service’s version of a SWAT team, trained in aggression work.

“ERT dogs are an option of less-than-lethal force,” writes Goodavage. “Instead of being on the receiving end of a bullet, an offender might end up on the receiving end of a dog bite. Not much fun but better than the alternative.”

That’s what happened when a man jumped the White House fence in October 2014 and was immediately tackled by Hurricane and Jardan, two Belgian Malinois who sustained hard punches and kicks by the intruder before gaining the advantage.

“OK, I’m done! Get the dogs off me!” the intruder yelled, when he finally lay on the ground with a Malinois attached to each arm.

The dogs were treated for minor bruising after the incident and were back on the job a few days later. Hurricane retired this fall.

All ERT dogs are Belgian Malinois, which have shorter hair, slightly different coloring and tend to weigh less than German shepherds.

Then there are the explosive detection team (EDT) dogs, trained to sniff out every kind of known explosive. They perform vehicle checks at the White House and travel around the world, preceding the president and vice president on trips. There are personal screening canines (PSC), the so-called “friendly dogs” who sniff out crowds of White House visitors, usually without the guests even knowing.

Whatever their particular area of focus, the dogs all share close bonds with their handlers, with whom they spend almost all of their time. (Indeed, Goodavage notes that while the Secret Service has dealt with their share of scandals in recent years, none have ever involved the K-9 units. “It’s hard to get into too much trouble chilling in a hotel room with your dog,” she writes. “[One dog] was fond of pulling toilet paper off the roll when [his handler] wasn’t looking . . . Kind of a pain, but hardly the stuff of Washington Post headlines.”)

Man and dog are together 24/7: They know pretty much everything about each other.

Man and dog are together 24/7: They know pretty much everything about each other.

“We know if they are mad, if they’re sad, if they’ve done something mischievous, or when they are sick,” an officer named Stew is quoted as saying in the book. “On the other hand, they know the same about us . . . These animals will gladly run into a hail of gunfire — giving their life — to do their job. All they ask in return is for you to throw the ball with them, pet them and talk to them in an embarrassing high voice like they’re the best toddler in the world.”

Something that sets the dogs apart from just about everyone during this election season: They are completely nonpartisan.

“The dogs don’t get involved in scandals and they will protect [the President-elect] with the same vigor,” says Goodavage. “It’s about pleasing their handlers. It’s where the bond is, and that’s what it all boils down to. Your dog knows you better than any human in your life. The dogs want to make their favorite person in the world happy.”