Washington CNN  — 

Here’s some advice: If you’ve crossed Barack Obama in the last year, you might want to stay home on Saturday night.

The President is sharpening his sword ahead of the annual White House Correspondents’ Dinner, and past targets like Donald Trump, John Boehner and Mitch McConnell know how deep Obama’s words can cut.

READ: What to expect in Obama’s speech Saturday night

Of all recent presidents, Obama has taken humor closer to the hard-to-define threshold of what is appropriate coming from the mouth of a president.

Sure, like his predecessors he usually opens with the regular ribbing of the press and his staff and greases the way for his biting attacks with self-mockery, poking fun, for example, at his penchant for teleprompters or his allergy to D.C. backslapping.

But Obama’s jokes can also be daring and cut deep. With adept comic timing, the president – whose political enemies have often put his image through the shredder – leads his audience right up to the line … and sometimes over it.

In his most merciless routines, Obama has compared Republican House Speaker Boehner’s permanent tan to his own skin tone, which according to Obama proves “orange is the new black.”

“He’s a person of color, but not a color that appears in the natural world,” Obama once said of his House of Representatives nemesis.

McConnell, the Senate majority leader, has also gotten it in the neck. To pundits who said he should spend time with the Republican Senate bull, Obama responded archly in 2013: “Why don’t YOU get a drink with Mitch McConnell.”

Obama’s not just playing for laughs. There’s something deeper going on. For a president who rarely loses his temper in public, the dinner offers a safety valve.

“It is a safer environment to take on some of those more hot-button issues and deflate them,” said Adam Frankel, a speechwriter for Obama during his first term. “In the course of everyday speechwriting, there are opportunities to deliver lines here and there, but not opportunities for extended riffs and humor of this kind.”

Obama for years peppered campaign speeches with jokes about the birther movement’s claims that he’s not a natural-born American and therefore not qualified to serve as president. But it wasn’t until the 2011 White House Correspondents’ Dinner that the president was able to expose the absurdity of the attacks. And that was bad news for the Donald, whom he eviscerated over the issue.

Breaking taboos

Obama, the pathbreaking first African-American president, has been able to take the speech further than it has ever gone before, even broaching the taboo topic of race in ridiculing GOP efforts to court minorities by saying former party chairman Michael Steele, who is black, was in the “heezy” – urban slang for house.

Obama gets away with dropping the anvil like this because he often delivers his jokes with a wink and a wide smile, bringing the audience along with a conspiratorial chuckle as he scans a punch line before saying it out loud.

But aides said that he is careful to chose his targets, viewing political opponents and the powerful as fair game.

“He doesn’t want to be nasty. He doesn’t want to hurt anybody personally,” said a senior Obama administration official, speaking on the condition of anonymity to discuss the president’s views of the speech.

“So much of the conversation in Washington caters to the extreme – either the trivial or the hyperbolic – and humor is a good way to poke holes in both,” said the administration official. “There are things he wouldn’t say in a press conference, for example, because they would come across as whiny or self-aggrandizing, but he can say them through humor at the dinner.”

The dinner is a rare chance for presidents to get a free pass to ridicule and swat at political enemies, offering them an informal setting to say things they have long wished to but would be too impolitic in a formal White House setting.

“Humor is both a shield and a sword in politics,” said Ari Fleischer, who served as former President George W. Bush’s first press secretary. “Humor is a shield because if people like you they will tend to give you the benefit of the doubt. It is a sword because one of the most effective ways to make fun of your opposition is humor as opposed to direct, frontal, mean-spirited attacks.”

Even so, some Republicans balk at Obama’s caustic style, which comports with their view that the president has elevated partisanship to new levels.

And when Obama hits his stride, it’s not always comfortable in the cavernous Washington Hilton ballroom. Like the best comedians, his most barbed lines often trigger a second of shock before the laughs.

But it’s not just Obama’s personal style that has made the annual event rawer; so have the times.

“The White House Correspondents’ Dinner is edgier than it used to be,” said Robert Lehrman, once a speechwriter for former Vice President Al Gore, who has written a manual for political speechwriters.

“I think everything else has gotten more hostile in politics now. Especially on the Hill. So why not jokes?”

Satire is king

Obama’s is a brand of humor to match a polarized age where the stand-up gags of late-night hosts on broadcast TV seem tame compared to the satirical swipes of Comedy Central – and when a veneer of good humored bipartisanship has long since been torn away.

Former President Ronald Reagan once lobbed gentle one-liners at the White House Correspondents’ Dinner like he was joshing show-biz pals at a roast or warming up the audience at the “The Tonight Show.”

Three decades later, Obama’s humor is more cruel, more personal and inherently more political.

More Jon Stewart than Johnny Carson.

Jeff Shesol, a speechwriter who prepped Bill Clinton for the big night when he was in the White House, said presidents must show they are comfortable with power but can also laugh at themselves.

“This isn’t just light entertainment. It’s a high-wire act for the president, and more so in the last decade or so than it used to be. We live in a different era,” Shesol said.

Politicians are frequent targets, but not the only ones. Obama likes to jab the media as well, throwing daggers at Fox News for perceived bias, cable outlets that he says prize trivia and insider publications like Politico that he accuses of hyping gossip.

“Some of you covered me. All of you voted for me,” Obama told the press in a poke at perceived liberal media bias at the dinner in 2009.

In an uproarious moment in 2011, Obama said he had unearthed a video of his birth – before playing a scene from “The Lion King,” where the infant cub that will be king is revealed to the world in a ray of light atop an African mountain.

The joke was funny because of the element of surprise and the clashing contexts of Obama’s biography and the movie. But the president was also mocking his own persona as a semi-divine figure chosen to lead his people out of darkness.

Obama, living by the maxim “if you can’t stand the heat, get out of the kitchen,”used the same speech to publicly lash birther-in-chief Trump in front of thousands of people. The peeved mogul, surrounded by nervous guests at his table, didn’t find it funny.

“Obviously, we all know about your credentials and breadth of experience,” Obama said, slamming Trump for his supposed display of leadership on “Celebrity Apprentice.”

“These are the kind of decisions that would keep me up at night. Well handled sir, well handled,” Obama said sarcastically.

The riff took on even more significance when it was revealed the next night that Obama, showing trademark cool, had gone to the dinner despite knowing that Navy SEALS were gearing up for the mission to kill Osama bin Laden.

Global events sometimes make striking the right note in the speech a delicate task. Obama will have to switch to a mirthful approach on Saturday after spending the last two days mourning, and apologizing for, the death of American hostage Warren Weinstein in a U.S. drone strike at an al Qaeda hideout along the Afghanistan-Pakistan border.

Self-deprecating moments

And even in the best of times, a president has to strike a balance: Obama’s sarcasm must be offset by a sign of personal modesty to ensure his quips come across as jokes and not harangues.

So in 2009, he mocked his own reliance on teleprompters, reading out the stage direction “Pause for laughter.”

A year later, when political gravity dragged him down, he joked: “I know my approval ratings are still very high in the country of my birth.”

But Obama can’t hold a candle to Bush when it comes to self-mockery.

Famously comfortable in own his skin, the 43rd president delighted in using the speech to defang critics who saw him as anti-intellectual, callow and not up to the job.

Once he appeared on stage with an impersonator to mock his malapropisms and pronunciation of the word “nuclear.”

On another occasion, he showed West Wing slide shows in which he played the fool.

Another year, first lady Laura Bush seized the microphone to roast her husband and proclaim she was a “desperate housewife.”

In his final appearance in 2008, Bush presented a retrospective of his greatest hits – reviving a slide that appeared to show Vice President Dick Cheney relieving himself against the Oval Office door.

He ended by pulling back the curtain on the Washington Hilton stage and conducting the Marine Band brass.

“It tells you about the president himself,” said Fleischer, who said the speeches, though put together by professionals and packed with jokes submitted by top comics, always have a personal touch.

“Presidents can hire funny speechwriters, but for the jokes to come off well, they have to really be reflective of the president’s personality. Bush, in private and in public, had a self-mocking personality, self-deprecating, full of humor.”

Still, that doesn’t mean Bush looked forward to the event.

The president’s speech is the most anticipated turn of the self-regarding pageant of pre-parties, post-parties, power brunches, celebrity spotting and Beltway schmoozing on the weekend needy Washington looks in the mirror and wants to see Hollywood.

But despite being the star and the guest of honor, most presidents can’t stand the dinner, viewing their annual gig in front of reporters who make their lives hell the rest of the year with the kind of enthusiasm reserved for a trip to the dentist’s chair.

Several have privately reflected on the irony of an occasion poking fun at the media and Washington insider culture on the very night that represents the annual apex of the city’s shallowness, one-upmanship and self-importance, former presidential aides said.

Yet despite the contempt in which they hold it, presidents are all performers who gravitate to center stage, and they haven’t gotten to sit behind their Oval Office desk by snubbing the chance to take free shots at their foes in politics and the media in a setting where almost anything goes.

Bill Clinton’s strategy

Perhaps no recent president has had as poisoned a relationship with the press as Bill Clinton during the shame and personal agony of his impeachment over an affair with White House intern Monica Lewinsky. But Clinton understood the power of humor.

In 2000, he bade farewell to the White House press corps by showing a video in which he moped around the White House alone. In one scene, he ran onto the South Lawn with a brown bag lunch for his wife Hillary, who had already swept away in a limousine.

In others, he watched his laundry roll around in a tumble dryer and raided a vending machine selling ice cream in the White House basement.

The video contrasted with the popular image of Clinton fighting against his lame-duck status and played into questions of how this quintessential politician could ever live without the limelight of the White House.

But it also had a political purpose. The White House at the time was frustrated with a media narrative that portrayed Clinton as morose and directionless, and aides wanted to strike back.

“We really consciously wanted to undercut the narrative that was developing in the media that he could not stand the idea that he had to give up the microphone, that all the action was with Hillary Clinton and Al Gore and he must of course be miserable,” Shesol said.

“It was the biggest reaction I had ever seen in the hall. It was a success on the terms that we had set out from the beginning. One was to be funny, the other was to change the perception.”

Clinton believed the speech was also a success, telling historian Taylor Branch for his book the “Clinton Tapes” that the speech helped to showcase his ability to laugh at himself and spike his approval ratings to back near 60 percent, “which he said marked his recovery from the Lewinsky scandal.”