Actress Ellen Barkin scared off a would-be robber after confronting him inside her Greenwich Village home, police sources told The Post.

Barkin, 63, told police she awoke to a noise in an upstairs bedroom at her West 12th Street home, located between Sixth and Seventh avenues, just before 7 a.m.

When she went upstairs, she caught the perp on her third-floor balcony, a police source said.

She grabbed the balcony door just as the man, who was wearing gloves, tried to open it to get back inside the apartment, the source said. He then fled by jumping from the balcony to an adjoining fire escape.

The suspect bolted without taking any property — but Barkin noticed a bag and jewelry that had been moved from one location in the home to near the balcony. She wasn’t injured.

“I guess he was fixing to leave with the stuff that he had collected,” the source said.

The man was described as between 20 and 30 wearing a backpack.

Barkin, who starred in the 1989 crime drama “Sea of Love” with Al Pacino, tweeted about being less than impressed with the police response.

“@NYPDByrne … only because u have the full name of the father of my children…the first responders were great, here in 70secs! still waiting for the detectives… it’s only been 4 hours,” she wrote two hours after the home invasion.

The Bronx-born Barkin then followed up a few minutes later, “.@NYPDByrne @NYPDONeill @NYPDDetectives Did I just hear this right? No detectives here, at all? My heart breaks for another day that will live in infamy but crime is still going on…in my house. @NYPDDetectives Robert Boyce.”

An NYPD spokesman said patrol officers responded to Barkin’s 911 call of an intruder within two minutes, but that detectives in the area have their hands full with the terror attack that killed eight in Lower Manhattan.

A police source reiterated that point.

“We don’t just stop our terrorism investigation for Ellen Barkin,” the source said. “Sorry, Ellen Barkin.”

There was no answer at Barkin’s home Thursday.

Additional reporting by Tamar Lapin