After more than 18 years of marriage, comedian Chris Rock has filed for divorce. Here are some of his most biting comments on how hard it is to make a marriage work. (Gillian Brockell/The Washington Post)

It’s no secret: Chris Rock did not like being married.

Or, if he did, he sure didn’t sound like he did.

“Marriage is beautiful,” he said in 2004, more than seven years after he said “I do.” “But if you think you’re going to hold onto your individual self, you’re an idiot.”

Rock’s barbed riffs from an interview with NBC’s Stone Phillips a decade ago sound like signs of trouble now that the 49-year-old actor has announced his impending divorce. Over the weekend, Rock and his wife of 19 years, Malaak Compton-Rock, a philanthropist with whom he has two children, said they would call it quits.

“Take yourself to the door and wave, ‘Hey, see you later,'” Rock told Phillips. “You don’t walk around the house like you’re Stone Phillips. You’re ‘Her husband.’ That’s it.”

Rock also expressed sympathy for an unlikely figure — al-Qaeda’s No. 1 — who he thought might be suffering in holy matrimony as well.

“Hey, if bin Laden was here right now, he’s going, ‘Oh, yeah, my eight wives are killing me, too,'” Rock said.

Nor did Rock portray a happy home in his hilarious — and, in a family newspaper, unprintable — riffs on marriage as sexless and miserable in his 2004 HBO special “Never Scared.”

Even a political saint who endured decades couldn’t take the institution, Rock said.

FILE DECEMBER 28, 2014: Comedian and actor Chris Rock has filed for divorce from his wife Malaak Compton-Rock. Malaak Compton-Rock released a statement on December 28, 2014 confirming the divorce filing. The couple were married for 19 years and have two daughters together. Chris Rock had divorce documents drawn up in 2006 but the couple reconciled. HOLLYWOOD, CA - NOVEMBER 08: Comedian Chris Rock speaks onstage during the Academy Of Motion Picture Arts And Sciences' 2014 Governors Awards at The Ray Dolby Ballroom at Hollywood & Highland Center on November 8, 2014 in Hollywood, California. (Photo by Kevin Winter/Getty Images) Chris Rock in November. (Kevin Winter/Getty Images)

“Nelson Mandela spent 27 years in a South African prison,” Rock said.  … Man can do hard labor in 100 degree South African heat for 27 years and did it with no problem. He got out of jail after 27 years of torture, spent six months with his wife and said, ‘I can’t take this s— no more!'”

Of course, marriage has been a tried and true target for some long-married comedians, notably the late Henny Youngman of “take my wife, please” fame.

Rock’s either sincere or played-up dissatisfaction went beyond remarks in an old comedy special and in decade-old interviews. After tabloids reported the Rocks were on the rocks in 2007, the couple took to the pages of People to deny the rumors.

“Though we have tried in the past to take the high road and not comment on the tabloid media, we find it necessary to express on record how unfortunate it is that the Daily News, specifically, and other tabloid outlets have chosen to print untrue rumors and lies about our family and marriage,” the couple said in a statement“It is extremely hurtful to us, our children, and our extended family. We remain, as always, very happy and committed to our marriage and the beautiful family that we have built.”

Yet these statements came not long after Rock directed, co-produced and — with the soon-to-be-divorced comedian Louis C.K. — co-wrote a film called “I Think I Love My Wife.” The premise: A man played by Rock trapped in a sexless marriage contemplates an affair.

“I’ve been married close to seven years,” Rock said in a preview. “My wife is beautiful, intelligent and a great mother.  There’s just one problem: We’re bored out of our minds.”

Theme music: “My Lovin’ (You’re Never Gonna Get It).”

One of the film’s key revelations is that his resistance to having an affair comes as much from wishing to maintain his lifestyle (the high-paying job, the nice house, the kids) as from loyalty to his wife,” the A.V. Club wrote.

Indeed, in Rock’s comedy — as in material from Louis C.K., Larry David and Bill Cosby — marriage isn’t just an institution worth a few kindhearted jokes, but a kind of master-slave relationship worth skewering. For Rock, “ball-and-chain” seemed more than an expression.

“The most romantic words a man will ever say to you are these words: ‘I ain’t going nowhere,’ ” Rock said in his concert film “Kill the Messenger” (2008). “When a man says ‘I ain’t going nowhere,’ what he’s trying to tell you is: ‘I’ve actually thought about going somewhere. I talked to a lawyer. I looked at a place. And I realized I’m going to go through the same s— with the next girl, so why not just stay here and be miserable with you?’ ”

The news may distract during Rock’s round of interviews for his new film “Top Five.” But it comes as no surprise.

As an unnamed individual told E! News, the Rocks have “been living separate lives for some time.”

People magazine reported Sunday that comedian Chris Rock has filed for divorce from his wife of more than 18 years, Malaak Compton-Rock. (Reuters)

Correction: An earlier version of this post misstated the number years the Rocks have been married and the number of children they have. They have two children and have been married for 19 years.