For Israeli comedians, the collective trauma of Hamas's deadly attacks on October 7 and the ensuing war has tested the limits of what it is possible to joke about.

"Eretz Nehederet" ("A Wonderful Land") has been a staple of primetime TV for 20 years -- a pitch-black sketch show along the lines of "Saturday Night Live" or "The Daily Show" in the United States.

After the October attacks, in which Israel says 1,200 people were killed and 240 taken hostage, the show went off the air for three weeks.

"We were in mourning. Each of us has lost someone or knows someone who has lost a loved one," Muli Segev, the show's producer, told AFP.

But it eventually returned under a new name -- "Eretz Nilhemet" ("A Warring Land") -- to take a satirical bite out of Israel's detractors.

"It is the oldest secret of the Jewish people: laughing in the face of death," Segev said.

One skit lashed out at international coverage of the Israel-Hamas war, featuring a Western journalist giving a gushingly sympathetic interview to Hamas leader Yahya Sinwar.

"It's really hard to conduct an interview with a noisy kidnapped baby in the background," the journalist says at one point.

Another sketch, taking aim at pro-Palestinian students on US campuses, showed a group of them holding a video call-in with their "BFF -- bestie freedom fighter" in Gaza.

The team are not pulling their punches on Israeli politicians either, especially when it comes to Prime Minister Benjamin Netanyahu -- in power for most of the past 15 years -- who has been widely criticised in the wake of the attacks.

One sketch involved Netanyahu telling the Hamas leader: "Aren't you ashamed? After everything I did for you? I released you from prison..." -- a reference to Sinwar's release from Israeli jail along with hundreds of other Palestinian prisoners in 2011 in exchange for a captured Israeli soldier.

The humour may tread a fine line, but it has been warmly welcomed by the Israeli public, with record viewing figures since its return.

"For 20 years, 'Eretz Nehederet' has gone through wars and traumatic events, including the pandemic, and we've never before missed an episode, because we're convinced that comedy is the best remedy against fear and anxiety," said Segev.

Despite the team's determination, the filming has taken its toll.

Eli Finish, the actor playing the Hamas leader in the media sketch, broke down during the shooting when the recorded cries of a baby were played.

Other comedians are also finding ways to work through the difficult period.

The hugely popular stand-up Adir Miller, who has a regular TV show, performed for troops and in hotels hosting survivors from the October 7 attack.

Miller admitted he "hesitated a lot", but hoped he could "help raise the morale of the troops a little bit".