A man who tried to shoot a 45-year-old woman outside her New York home was prevented by a malfunctioning gun, the NYPD said.

Dramatic security footage shows the gunman rushing up to the target's home in Queens at around 6:40 p.m. on Friday.

The man has a black cloth draped over his face to protect his identity.

At the beginning of the video, the would-be assassin approaches with his weapon drawn

He points the gun at the 45-year-old woman who can be seen blurred out on the home's stoop

He aims his gun at the woman, who can be seen blurred out on the stoop of the house at 109th St. and 109th Ave. in South Ozone Park.

The man struggles to rack the gun's slide.

He can be seen stepping back and trying to fix the problem, but when the weapon fails to fire a second time, he runs off.

The assailant appears to look at his weapon in confusion when it does not fire as planned

He steps back from the Queens home for a few seconds and checks his malfunctioning firearm

After rushing towards his target again, his weapon fails to fire again and he looks down at it

A second security camera caught the man fleeing, and part of his face is visible in the video as the cloth slipped off.

Officials said the assailant was seen in the area before the attempted shooting and had walked back and forth in front of the home waiting for the woman to return.

Cops describe the man as black and was last seen wearing a white shirt, blue jean shorts, black socks and black Nike slide sandals.

Police shared the footage on Twitter with the caption 'Wanted for menacing,' asking anyone with information to call Crime Stoppers at 800-577-TIPS.

After failing to rack the gun a second time, the man fled the scene at around 6:40 pm on Friday

Another security camera caught the man running off and part of his face became visible as the black cloth slipped from his head