Yet another lawmaker has lost his seat because of an unseemly obsession with his pants.

Richard Steinberg, a Democratic state representative from Miami Beach, abruptly resigned on Friday after he admitted to sending a string of racy text messages to a federal prosecutor whom he addressed as “sexxxy mama.” Asst. U.S. Atty. Marlene Fernandez-Karavetsos had been so vexed by the texts that she complained to the U.S. Secret Service.

Steinberg’s resignation came very soon after the Miami Herald broke the story, which immediately went viral, with the Huffington Post including the married Steinberg in a slideshow of other pols undone by sex scandals — a roll of shame that includes former Florida Congressman Mark Foley, former New York Congressman Anthony Weiner, former New York Governor Eliot Spitzer and former Detroit Mayor Kwame Kilpatrick.

The story almost didn’t happen. As Herald courts reporter David Ovalle relates, he spotted a search warrant while on a routine check of the clerk’s office in the Miami state courthouse, something he does every couple of weeks. He doesn’t usually find big stories there. “Mostly, they are run-of-the-mill drug seizures or hydroponic labs, or maybe a drug or domestic murder,” Ovalle told me in an email.

The name Steinberg didn’t leap out at him. Maybe an anonymous ticket lawyer, Ovalle thought. “I took a copy anyway just to be sure,” he said. “On my drive to the office, I Googled the name and my jaw dropped.” Ovalle had actually talked to Steinberg once or twice, back when the state representative was a Miami Beach commissioner.

The next day, Ovalle called Steinberg’s office, which wanted proof he was under investigation. Ovalle sent them a copy of the warrant, which left no doubt the Secret Service knew the messages came from him. “Within two hours,” Ovalle said, “Mr. Steinberg had admitted he sent the texts.”

That was Wednesday. Two days later, Steinberg stepped down.

Ovalle took no pleasure in Steinberg’s downfall. “I hate reveling in anyone else’s misfortune, as much as it of their own doing,” he said. “So when people have congratulated me on ‘bringing down’ a politician, I usually reply with, ‘He brought himself down.’ ”

The rapidity of the resignation surprised Marc Caputo, the Herald‘s political writer. Politicians who show such awful judgment are usually slow to admit the error of their ways. He said in a email: “Often, it seems, there’s an ego-freak aspect to some politicians who 1) feel they can do stuff like this and then 2) think they can explain or spin it away and hold on to power.”

What did surprise him was how quickly the story spread. His email continued:

Twitter, coupled with blogs, make stories like this explosive. Within moment of posting, someone in Nepal can read it and tweet back or comment online in an instant. The days of there being a morning newspaper and a nightly TV broadcast are over. Put our blogs and tweets together, and we’re publishing the equivalence of about four papers a day. And people are eating it up, especially when the word “sexxxy” is involved.

What we see here is the value of beat reporting’s routines — the methodical, often dull work done by news organizations that pay salaries for reporters to monitor the paperwork filed in courthouses, sit through city council and school board meetings, read the bills submitted in legislatures. It’s this vital, if boring, work that’s most jeopardized by the economic collapse of the newspaper business.

“It underscores what I believe Vegetius said in his book about Rome’s military,” Caputo said in his email. “The essence of an art is preserved in its constant practice.”