DUBLIN (CBS SF) — A woman was killed and a man was injured in a shooting during an attempted home invasion robbery at the home of her ex-boyfriend, according to authorities.

The incident happened Wednesday at about 11:30 p.m. at a home on the 3400 block of Central Parkway near Grafton Street.

Dublin police said the home’s resident awoke to his ex-girlfriend banging on his front door and when he opened, he was confronted by her and man who pointed a gun at him.

Police said the ex-girlfriend and the other man attempted to assault the resident and in self-defense, the resident opened fire with his own gun as he fled, hitting both.

“He feared for his life, used his own gun and shot his way – basically shot his way out of the residence – fled the area and then called 911,” said Dublin police Capt. Nate Schmidt.

The woman was pronounced dead at the scene and the man was hospitalized with non-life threatening injuries.

It’s believed the male suspect also fired at the resident as he fled but the resident was not hit.

The identities of the suspects and the victim were not immediately available.

Police officers were going door-to-door looking for surveillance video and information from neighbors.

Neighbors say when they heard the commotion, they didn’t realize anything was seriously wrong until police swarmed the area.

“I did hear the banging. It was pretty loud, then I heard a bunch of yelling and I’m, like ‘OK, what’s going on?’ I thought it was just my neighbors arguing,” said Daryl Sessions, who lives two doors down.

A K9 unit searched in a field adjacent to the crime scene. Eastbound lanes of Central were closed at Grafton as the investigation was being conducted.

“Obviously it’s a very serious crime. These types of things don’t happen in the city of Dublin very often,” Capt. Schmidt said.

Neighbors say they never expected it would happen in such a quiet community.

“I didn’t think something like this would happen next door. You hear about it on the news all the time, but it just freaked me out,” said Sessions.

The homicide was the first in the city of Dublin since 2009.

KPIX 5 correspondents Katie Nielsen and Andria Borba contributed to this report