“Reservoir Dogs” star Steve Buscemi and 11 others, busted protesting the closing of Engine 204 in Brooklyn’s Cobble Hill in May, were told they won’t have to go to jail if they behave themselves.

At a dramatic court hearing at the Red Hook Community Justice Center, Judge Patricia Henry dropped criminal trespass charges against the dozen activists.

And she told the demonstrators their police records would be wiped clean if they didn’t get into trouble for the next six months – a verdict that had a room full of supporters cheering in delight.

Steve Buscemi, an ex-Manhattan firefighter, and his accomplices were busted May 25 after they locked arms to form a human chain outside the historic firehouse to protest the controversial closing of 204 and five other engine companies.

If convicted, they could have been sentenced to up to a year behind bars and fined $2,500 apiece.

Buscemi, who’ll appear in the new season of “The Sopranos,” told The Post he’s glad he won’t be serving time, but he’s not through battling the city to try to get the firehouses reopened.

“I’d be happy to help again. These six firehouses that were closed were actually penalized because they had a quick response time – they responded too quickly to fires,” he said.

And the tough-guy actor said it will be tough being good for six months while the firehouses remain shut.

“I’ll have to stay inside and never go out,” he joked.

The protestors’ lawyer, Kenneth Thompson, hailed the no-jail deal hammered out with the Brooklyn district attorney as humane.

“These men and women engaged in acts of civil disobedience and risked going to jail to ensure the safety of the people of New York. For that they should be commended,” he said.

Others who were spared jail yesterday included Assemblywoman Joan Millman (D-Brooklyn) and City Councilman Bill deBlasio.

“We’re going to continue to struggle to reopen,” said deBlasio. “And history tells us that firehouses that close do typically reopen.”

Millman added: “It was my first experience [being arrested], and I hope it’s my last experience. But I believe it was worth it.”