Members of Squad 288 were called into action when a male stabbing victim came running to the firehouse.

The attack began around 10 a.m. at a nearby building in Maspeth when the victim was stabbed in the left thigh as he slept, cops said. The victim managed to get up & run away but his attacker chased him, according to police.

That's when firefighters at FDNY Squad 288 at 56-29 68th St. saw the fracas.

They could see the victim had been stabbed in his left thigh, a fire official said.

"It's a pretty serious stab wound," said Lt. Paul Dulisse. "He came into the firehouse where the members provided him refuge & medical treatment. The other individual pursued him into the firehouse. He tried to make another aggressive move."

Dulisse said Firefighter Patrick Conway, 35, who is a former NYPD officer, "quickly responded" when the attacker pulled his knife again.

"Our member subdued the individual until the police arrived," Dulisse said. "He just grabbed him around his arms & held him down."

Conway declined to comment about the incident.

Andy Ansbro, head of Uniformed Firefighters Association, said the victim "had a 6- to 8-inch cut in his leg, a deep knife wound, he'd been stabbed & was trying to get away."

Police arrested Daniel Gomez, 27, after responding to the incident & charged him with assault. The victim was treated on scene & taken to Elmhurst General Hospital.

Gomez had three outstanding warrants against him — two are for driving without a license & one was a bench warrant stemming from a case where he's charged with possession of burglar tools, cops said.

"We're always going to take risks to protect people," Dulisse said. "You're proud of the member when they're willing to step out of the box & protect somebody."