The last words of Baltimore-based comedian Jason Weems very nearly were “Thank you, good night.”

That’s what he said right before rushing off the stage in a Philadelphia club May 3 in the throes of an asthma attack that rendered him completely unable to breathe. A physicians assistant who happened to be in the audience followed him outside and couldn’t detect a heartbeat, but she performed CPR until an ambulance arrived. Weems was clinically dead for about five minutes before the medics got his heart beating again.

While Weems, 36, spent the night at a hospital fighting for his life, the club’s booker had no idea who to call. She didn’t have Weems’ wife’s phone number or even her name. So she tweeted into the void: “Does anyone know @jweemscomedy’s family?” Weems’ fellow comedians sprang into action.

“It was like a Twitter emergency phone tree,” says Theresa Concepcion, one of the D.C.- and Baltimore-area comedians who helped get ahold of Weems’ wife.

“With me being literally gone for five minutes, they were afraid I had brain damage,” Weems says. “They had me on a ventilator but I still wasn’t responsive.”

It wasn’t until the next day, after his wife arrived, that Weems regained consciousness.

“I woke up and one of my first thoughts was, ‘I need to get the f— out of this hospital. Just put a blanket on me and roll me out like Tupac,’ ” Weems recalls. “I knew this dying s—’s gotta be expensive.”

Weems’ friend and D.C.-based comedian Haywood Turnipseed Jr. was thinking the same thing.

“I knew he was going to have bills, so I messaged him on Facebook and said, ‘Let me know if there’s anything I can do to help — besides giving you 10 grand,’ ” Turnipseed says.

Weems’ bill — after insurance — totaled closer to $61,000. To help, Turnipseed and Conception have organized a fundraiser (dubbed “F.U.N.” for Friends Understanding Needs) at D.C.’s Drafthouse Comedy on Aug. 9. The show is free — those who want to donate to Weems can do so through a GoFundMe page or a raffle that night — and will bring together an impressive lineup of local headliners that includes Rob Maher, Kasaun Wilson and Lafayette Wright. Turnipseed will host the event, which will kick off a series of F.U.N. fundraisers (for various causes, such as legal support for refugee children) at the Drafthouse the second Wednesday of every month.

The comedians are eager to help Weems because he’s “on track to being one of the greats,” Turnipseed says, noting that Weems was a semifinalist on NBC’s “Last Comic Standing.” “We’d hate to see this slow him down.”

Weems, who took time off from comedy to recover, will close out the show with a short set. The benefit will be one of the first times he’s tried out his new material onstage — material that, as you might guess, is all about his near-death experience. In fact, Weems started writing jokes while still at the hospital, asking his wife to take notes on his cellphone.

“As soon as I regained consciousness, I was thinking up jokes. Literally before I left the hospital, I had maybe 10 minutes,” he says. “Comedy has saved me in that sense. I still get stressed out about my asthma or my medical bills, but I don’t go off the deep end because I know this s— is going to turn into a killer 25, 30 minutes. S— that no other comic has.”

By all accounts, Weems’ medical prognosis and comedy future are bright. He’s been taking new medication and hasn’t had any asthma attacks since the Philadelphia show. He’s also working on a new stand-up special and shopping around a sitcom pilot.

Turnipseed predicts Weems will come back even stronger — and funnier — than before.

“He told the Grim Reaper to kiss his ass,” he says. “There ain’t no stopping him now.”

Drafthouse Comedy, 1100 13th St. NW; Wed., 8:45 p.m., free