A man is dead after he was shot by police in Elmira following a home invasion and chase.

It started just before 5:30 Thursday morning. Police got a call about a robbery on Johnson Street in Elmira, where three shots were fired inside a home.

They developed a suspect: 34-year-old James Davis. About four hours later, they got information that Davis was driving around Elmira. Officers tried to pull him over, but he refused and took off.

The pursuit led them east out of the city, then north towards Horseheads. Police say during the chase, Davis fired at a patrol car.

He eventually stopped and got out of the vehicle, armed with a handgun. Officers fired, critically injuring Davis. He was taken to a local hospital, where he later died.

Police are still looking into what led up to the shooting.

"We're still conducting the investigation," said Joseph Kane of the Elmira PD. "We won't know the mindset of the suspect. What we can say is when he exited the vehicle, he was armed with a handgun, and just prior to that, he discharged rounds at police officers."

Police say Davis had an extensive criminal history and an active warrant for a parole violation.