With his latest sitcom getting the ax, pals fear former “Friends” star MATTHEW PERRY could fall off the wagon, says a source.

The talented 43-year-old actor has bounced in and out of rehab while battling booze and drug demons, and the cancellation of his NBC series “Go On” is just the latest in a string of disappointments.

“It’s been nine years since the last episode of ‘Friends’ aired, and Matt has been struggling to rebuild his life ever since,” a pal told The ENQUIRER.

“This cancellation hit him hard, and his friends are watching him closely. They’re worried he may turn to pills and the bottle to help deal with the hurt.”

A rep for Perry denied that the star is at any risk of turning to pills or booze and said his friends should not be concerned about his sobriety. Perry has been a high-profile advocate of specialized drug courts, and he recently received the Champion of Recovery Award from U.S. Drug Czar Gil Kerlikowske for “giving a voice to the millions of Americans in recovery.”

Perry did rehab stints at the Hazelden treatment center in Minnesota in 1997 and Promises rehab in Malibu in 2001. He later admitted he’d been downing 20 to 30 Vicodins and “probably a quart of vodka” a day.

And in 2004, The ENQUIRER reported exclusively that Perry had slid back into boozing and popping pills after staying clean and sober for nearly two years.

Perry’s most recent rehab stint came just months after his sitcom “Mr. Sunshine” was canceled in February 2011. Another series, “Studio 60 on the Sunset Strip,” was dumped in 2007.

“Rejection is a hard pill to swallow, and Matt’s been facing it ever since ‘Friends’ ended,” the source said. “Now, his pals are urging him to take a break from acting and focus on himself.”