A state agency fiddled while the Rockaways burned.

And 150 drug-addicted criminals were set free into the chaos of post-Sandy New York.

That was the final option for the people who run the Daytop Village substance abuse treatment center in Far Rockaway after Hurricane Sandy ravaged New York’s most vulnerable shore.

“Our electricity went down, and we had 2 or 3 feet of water in the 250-bed facility” at 316 Beach 65th St., said Daytop CEO Mike Dailey CEO. “I tried to get state officials at OASAS [state Office of Alcohol and Substance Abuse Services] to simply check some boxes and give us official approval to transfer our court-mandated clients to one of two upstate Daytop facilities.”

He says OASAS wouldn’t do it.