An Egyptian-American comedian had the cops called on him after a stand-up set in Florida over the weekend — when an audience member took his joke about terrorism seriously.

Funnyman Ahmed Ahmed, 48, told The Post the ordeal started Saturday when he told a gag poking fun at stereotypes about his heritage at Off the Hook Comedy Club in Naples, asking the audience of mostly older, white folks: “How many people here are from the Middle East?”

When a few people clapped, he says he quipped, “Well, it only takes one of us …” — then, after a laugh break, continued, “… to tell a joke!”

He then added, “But seriously, lock the doors.”

But not everybody thought it was a knee-slapper. The next day, a comedy club-goer called the Collier County Sheriff’s Department to report that a “terrible” joke had made him “uncomfortable.”

“There was a comedian. His name is Ahmed Ahmed and he’s, you know, Middle Eastern,” the man told a dispatcher, per an audio recording of the call.

The caller, who refused to give his name, said the comic had asked the audience if anybody hails from his region of the world.

“And a whole bunch of people raised their hands and said, ‘I’m from Iraq, I’m from Iran.’ And he said, ‘We could organize our own little terrorist organization.’ And I don’t think that was right,” the caller said.

“I just thought it was terrible. My wife and I looked at each other and felt very uncomfortable.”

Two officers were sent to the club to question Ahmed before his 7 p.m. Mother’s Day show.

“The club manager came up to me with an embarrassed look on his face,” said Ahmed, who now lives in Malaysia.

“I thought, is this a joke? I thought there might be cameras outside and Ashton Kutcher is going to jump out and say, ‘You’re punk’d!’” he said.

Instead, the officers “politely” asked him a couple of questions and left.

“They were really nice,” Ahmed said. “They told me, ‘Don’t change your material.’”

The sheriff’s office confirmed there was a “suspicious incident” at the comedy club, but said no written report was taken, so it could not offer more details

The weirdest part, the comic added, is that the caller waited a full day to report the gag.

“After the show [he] was at, I stood outside and shook the hand of 98 percent of the audience,” he said.

“I mean, come on, terrorists don’t do meet-and-greets!”