Jimmy Fallon narrowly escaped a bar room brawl after a fracas broke out while he was partying with friends following “The Tonight Show.”

Sources said the NBC host and a group of friends and co-workers headed to East Village bar Niagara on Thursday night after work.

But when 39-year-old Fallon and his crew arrived at the grungy, crowded rocker hangout around 10:30 p.m., they didn’t exactly get a warm welcome from fellow patrons.

Customer Ron Harrell posted on Twitter, “Fallon just got in a fight at Niagara Bar. Go NYC.” He posted a picture that showed a suit-and-tie-clad Fallon being apparently comforted by a woman and closely guarded by a large glowering guy in an FDNY sweatshirt as a stunned crowd gathered around.

One source said, “There was some hostility from some people at the bar. Jimmy was not the aggressor, but he was caught up in it. It was broken up and Jimmy and his friends immediately left.”

Another added of Fallon’s night at Alphabet City hipster haven Niagara, “There was a kerfuffle, a dust-up amongst other patrons. Jimmy was caught up in it, but was not hurt and turned around and left. It was not caused by him and he was in and out in five minutes.”

Earlier Thursday — hours after learning Stephen Colbert would be his next CBS late night rival — Fallon welcomed Kevin Costner on his show, along with “Dancing With the Stars” fave Danica McKellar and a performance by “Cabaret” star Alan Cumming. Friday, we’re told an unruffled Fallon was back at work as usual and hosting Nicolas Cage, Emily VanCamp and a performance from KISS.

Fallon, who became a dad last year, is known to head out to relax after taping his show, and is usually a popular face at bars including Bill’s in Midtown, where he was recently spotted singing “You’ve Lost That Loving Feeling” along with other numbers.

The owners of Niagara didn’t comment Friday night. A rep for Fallon declined to comment and NBC didn’t respond.