Ed Rendell, the former governor of Pennsylvania who will play a key role at the Democratic Party's July convention in Philadelphia, has apologized for a quote he gave in an interview with The Washington Post. A joke he made about why Donald Trump's misogynistic remarks would backfire -- "There are probably more ugly women in America than attractive women" -- unexpectedly went viral, earning headlines from local Pennsylvania newspapers to People magazine.

"What I said was incredibly stupid and insensitive," Rendell told reporters in Philadelphia on Wednesday. "When I read it in the article, I said, 'Did I say that?' It was just dumb, and stupid, and insensitive, and if I offended anyone, I apologize."

As the reporter who interviewed Rendell, this seems like a good opportunity to explain how the quote got into the story. From Thursday through Sunday, I reported a piece about Philadelphia's suburbs, whose increasingly blue tinge had helped Democrats win the state in every presidential election since 1992. I reached out to Rendell, hoping to talk briefly in person to a politician who had mastered the art of winning the city and suburbs in his two thumping gubernatorial wins. I heard back with a phone call at 5:19 p.m. on Friday, as I was parking for an interview set to start at 5:30. An assistant put Rendell on the line, and I took detailed notes on the laptop perched on my steering wheel.

Rendell is a sought-after talk show guest because of his colorful way around a quote. This eight-minute talk was no exception. At one point Rendell described the sentiment of a Trump-leaning voter as "I’d like to see him kick the s*** out of the Chinese." He described Sen. Patrick J. Toomey (R-Pa.), who has squirmed about appearing on a ballot with Trump, as being "on the horns of a dilemma." And he expressed his theory that moderate Republican women would reject Trump -- with a push by Democrats -- in a few less resonant ways.

"The Republican women in the suburbs -- I think he’s got an awesome burden to win them back," said Rendell. "I think he’ll lose some thoughtful women and men."

I followed up by asking if Trump's crude comments about women, which were resurrected that day in a new ad from the Priorities USA super PAC, would overcome the votes of angry Democrats switching from Clinton.

"For every one he’ll lose one and a half, two Republican women," said Rendell. "Trump’s comments like, 'You can’t be a 10 if you’re flat chested,' that'll come back to haunt him. There are probably more ugly women in America than attractive women." Rendell laughed as he said the last few syllables. "People take that stuff personally. He demeans women. He demeans Mexican Americans, I think women are rightfully irritated by how he talks. Plus, you don’t know where he stands. One day he’s for Planned Parenthood, the next day he's against it."

When I finished reporting the story, Rendell's joke about "ugly women" clearly became a stand-out quote. I hadn't heard any malice in it; Rendell seemed to be making an arch point about the risk of telling the world that women were worthless unless they were smoking hot. But I was surprised when the Associated Press published a story based on the quote, and blurted out on Twitter that I didn't "intend that," meaning that I didn't expect a very Rendell-ian quote to become a problem for Rendell. As the news cycle churned, I was called out (on Twitter, naturally) for seeing no problem with what Rendell said.

It was true -- I'd given a lot of rope, and thought the quote was more salty than offensive. When it was analyzed as Rendell saying Hillary had "the ugly women vote" locked up, I disagreed, but realized that the average reader, whose Friday had not been full of conversations with Philadelphia-area politicians, was less amused than taken aback.

By apologizing, Rendell likely prevented any further backlash. (By the time of that apology, no political rival had really jumped on the quote.) I was not out to do a "gotcha" interview with Rendell, and he's danced around this minefield before, as when he walked back an analysis that President Obama's first Homeland Security pick, a woman, was advantaged by having "no family" and "no life." Born two years after Vice President Biden, Rendell is from a generation of urban politicians who never saw much need for a filter between brain and tongue.

The irony of this interview? It was about a first-time politician, from a different city but the same generation, whose lack of a filter helped win him the Republican nomination for president.