A lengthy joke about cows, sex and women apparently turned out to be no laughing matter in North Carolina this week. It has prompted the resignation of the chairman of the state’s elections board.

Bob Cordle reportedly told the joke Monday before hundreds of elections officials from across the state, many of whom were women. On Tuesday he submitted his resignation to Gov. Roy Cooper, who appointed him earlier this year. Both Cordle and Cooper are Democrats.

"I sincerely apologize to those who heard my joke at the elections conference on Monday and all those affected by my words," he wrote.

NORTH CAROLINA POLITICAL OPERATIVE FACES NEW CHARGES IN BALLOT FRAUD INVESTIGATION

He had said he believed the joke drew “a big laugh” when he told it, Raleigh’s WRAL-TV reported.

Cordle is the third state elections chairman to resign in North Carolina since December, the News & Observer of Raleigh reported.

After word spread that Cordle had told the joke, a blogger posted a version of the joke in a post titled, “How Did Bob Cordle Get To Be Chair of the NC State Board of Elections?”

North Carolina Gov. Roy Cooper speaks at the governor's mansion in Raleigh, N.C., Dec. 19, 2018. (Associated Press)

North Carolina Gov. Roy Cooper speaks at the governor's mansion in Raleigh, N.C., Dec. 19, 2018. (Associated Press)

North Carolina’s elections board has faced a string of controversies in recent months, according to the News & Observer.

Last December, then-Chairman Andy Penry resigned over a string of social media posts, including some that took shots at President Trump.

Cooper appointed Josh Malcolm to replace Penry, but Malcolm opted against rejoining the board after allegations of election fraud in a U.S. House race led to a power struggle between Cooper and Republican leaders in the state General Assembly, the newspaper reported.

Then Cooper appointed Cordle in February.

CLICK HERE TO GET THE FOX NEWS APP

After Cordle resigned, the spokesman for the state Republican Party blasted Cooper.

“For a career politician who spent more than 30 years in state government, @RoyCooperNC continues to prove he has no idea what he’s doing,” Jeff Hauser wrote on Twitter.