Two New York City police officers have been shot by a lone gunman as they sat in their patrol car.

The incident occurred in the Bedford-Stuyvesant neighbourhood of Brooklyn.

According to witnesses, the shooter approached the officers and began firing at them at point-blank range.

The suspect was pursued by officers into a nearby subway station. It's believed he shot himself.

He was taken to Kings County Hospital with a gunshot wound to the head. He is believed to have died as a result of his injuries.

Both officers were taken to hospital in a critical condition and are now confirmed to have died.

Nicol Malliotakis, the New York Assembly member for Brooklyn and Staten Island, said in a statement posted on Facebook: "It breaks my heart to report that we have received confirmation that the two NYPD officers shot earlier today have died."

"Please keep in your thoughts & prayers the families of these two innocent, selfless officers who gave their lives to serve & protect us."

Sources also said a gun was recovered at the scene.

Police have not yet commented on a possible motive.

The shooting comes amid heightened tension in New York and across the country over police tactics following the death of Eric Garner, who died after being held in a choke hold by two police officers.