Stuart Street sniper

An unhinged 30-year-old Stuart Street resident perched himself at his second-floor window and opened fire on a group of rowdy teenagers hanging out in front of his home on June 18, hitting two of them.

Stunned neighbors told police that Thomas Dunikowski argued with the teens hanging outside of the home he shares with his wife and child on Fillmore Avenue — demanding they leave his property — at 11:30 pm.

But instead of dispersing, the teens got rowdier and began to knock over garbage cans and kick nearby cars, neighbors said.

Outraged, Dunikowski punched one of the teens, 17-year-old Midwood resident Francis Ruan, then ran into his home. A few moments later he threw open his second floor window and, armed with a Bushmaster semi-automatic rifle, fired around 20 shots.

Police say Dunikowski shot indiscriminately into the crowd of 15 — scattering the teens.

But he must could also been aiming at Ruan: a bullet pierced his neck as the teen tried to escape the area on a bike.

Bullet fragments ricochetted off the concrete, striking a 15-year-old boy in the leg and arm. Paramedics took Ruan and the other teen to an area hospital for treatment.

A neighbor was also hit, but the young woman holds no ill will toward Dunikowski, who she said was a “hero.”

The woman’s mother, Larisa Kaprovskaya, said the teens were about to get violent.

“[Dunikowski] shot because he wanted to protect us,” Kaprovskaya told the Daily News. “I don’t know what would have happened to us if he didn’t try to protect us. I appreciate him.”

As police arrived at the scene, Dunikowski jumped into bed, and pretended to be asleep.

He fought off the cops as they took him into custody, charging him with attempted murder, assault and criminal possession of a weapon. The rifle was found inside its plastic case, police sources said.

Dunikowski was arraigned on Monday, and a $500,000 bail was set.

Ruan was mending at the hospital on Monday,.

We don’t want to talk about it right now,” Ruan’s sister told us when we called the teen’s E. 22nd Street home.

Prosecutors said Dunikowski has a history of violence: last October, he was arrested for threatening his wife and her parents. He allegedly showed up at his in-law’s Sheepshead Bay home, broke the glass door and slashed his father-in-law’s tires.

The menacing case against Dunikowski was ultimately dismissed, but an order of protection for Dunikowski’s in-laws was issued, stipulating that the Stuart Street man surrender all of his firearms — something he clearly didn’t do, prosecutors said.

But Jay Schwitzman, Dunikowski’s attorney, said the 30-year-old was lucky to have something to defend himself with.

“[Dunikowski] acted in defense of himself, his family and his neighbors,” Schwitzman said. “The people of Stuart Street were scared for their lives. These teens were not just kicking cars and turning over trash cans — they were drugged up, trashing everything they could find and would not stop, even when the police were being summoned. And they continued these felonious acts as they advanced toward [Dunikowski’s] property.”

None of the teens were arrested and no evidence of drugs were found. In fact, there was no evidence that the kids were being violent, a police source said.