SOUTH PORTLAND, Maine — He argued with his supervisor and got disciplined, made friends with drug dealers in order to get news from the street, and he isn’t afraid to tell you that one night he returned home from a grueling night of investigating and threw his clothing on the floor.

Seconds later, South Portland police Detective Sgt. Steve Webster pulled on those same clothes and headed back out the door when a new tip surfaced in the case he was investigating.

Webster’s self-published book “One Promise Kept” is about a promise he made to a 7-year-old crime victim, but it’s also a glimpse into the life of one lifelong Mainer who carried a gun and badge.

“It’s not always pretty, the cases don’t get wrapped up in an hour as they do on TV, and the decisions we are forced to make in an instant can be scrutinized for years,” Webster says in the prologue.

That is the life of a person who puts on the uniform.

“I’m no different from a guy in Bangor who does this job,” Webster said recently during a phone interview.

Webster published the book a year ago, with help from reporter Trevor Maxwell, after working since 1987 for South Portland Police Department where he spent time as an agent for the Maine Drug Enforcement Agency, and as the Criminal Investigation Division supervisor.

The book takes readers through the steps Webster made while investigating a 1998 home burglary involving two Asian girls who were tied up, had their jewelry stolen and had weapons pointed at them.

“It doesn’t get any more real,” Bangor police Detective Larry Morrill said recently about the book. “This is from right here in Maine. This is reality.”

While telling the story, Webster touches upon drug addiction and trafficking in the state, the poor, domestic violence, sex and murder — including some of the scariest moments of his life — and how he merged responding to those into his everyday life, which included marriage, three children and an ill father.

“My work was a slide show of death, degradation and filth, and then I would return home where I was expected to be a loving husband and doting father,” Webster wrote. “It wasn’t easy.”

The same was true sometimes when responding to police calls.

“We’re human and we have emotions and we’re expected to smile all the time and it’s not always possible,” Webster said. “The cop who shows up to deal with someone’s broken window may have just come from a fatal accident and that broken window may not be that important.”

The sacrifices police and other law enforcement officials make are demonstrated again and again in the 158-page book, interspersed with what Webster calls black humor.

“Laughter is a tool we use to manage that stress,” he writes about himself and fellow officers.

The five men who broke into the Asian girl’s home eventually were arrested and convicted of the crime — a moment Webster found gratifying — and he was able to keep his promise.

“I made that girl a promise and I never thought I would be able to keep it,” Webster said. “I promised her the night that it happened that I would catch these people.”