The man shot dead by authorities after stabbing a veteran police officer twice was wanted over the rape of a teenager girl who 'he impregnated'.

Detective Sergeant John Breda is recovering at St Vincent’s Hospital after being stabbed in the chest and abdomen by an alleged child sex offender he was attempting to arrest at Maroubra Junction Hotel on Australia Day.

The 45-year-old officer’s condition has improved from critical to “serious but stable”, following emergency surgery, with senior police warning he is not yet in the clear.

Detective Sergeant John Breda has been described as a "well regarded" senior officer.

The man who stabbed him, Nick Newman, was shot by two police officers and died at the scene.

The 33-year-old was wanted over alleged child sex offences, police have said.

He was facing six counts of rape against a teenage girl, who 9NEWS understands he got pregnant.

A warrant was issued for his arrest on Wednesday after he failed to appear at Penrith Local Court.

The Homicide Squad has launched an investigation into the Maroubra stabbing and shooting.

Police circulated a photograph of Newman and tracked him to the pub in Maroubra Junction yesterday afternoon for what they thought would be a routine arrest.

A pub-goer has told 9NEWS he was having a quiet pint in the pub’s beer garden when he saw a man “making a break for the door”.

“A lad stopped him – he was in normal clothes. And then I’ve seen a man pull out a knife (or something) and stab the guy,” the witness told 9NEWS.

“Then the guy dropped onto the floor and another (man) pulled out a gun and shot five times.

“Everyone was really freaked out ... I didn’t know what was going on.”

Vision from inside the pub, obtained by 9NEWS, shows chaotic scenes as emergency services ensued, with police, ambulance and a rescue helicopter rushing to the scene.

The alleged child sex offender, Nick Newman, was shot dead.

“There’s a cop down, mate,” one man is heard saying, as another man, who appears to be an officer, yells: “Do not move”.

Doctors are comfortable with Det. Sgt Breda’s recovery progress, as he remains in intensive care with his wife Kim and colleagues at his bedside, Acting New South Wales Police Commissioner David Hudson said this morning.

“We have spoken to medical staff as well as family members,” Act. Comm. Hudson said.

“However he is no means out of danger. All of the police have their fingers crossed and are saying prayers for him.”

Police Minister Troy Grant described being told of Det. Sgt Breda’s injuries as “the worst phone call a minister can get”.

The 45-year-old officer's condition was downgraded from critical to serious.

“It will be a long process for him and his family both physically and emotionally … anything they need, we are there for them,” he said outside St Vincent’s Hospital.

Assistant Commissioner Mark Walton yesterday described Dt. Sgt Breda, who was honoured by the prime minister with a National Medal in 2015, as a "senior officer" who was "very well regarded by his peers".

"I know there will be a lot of people very concerned about his condition," he said.

The two other officers involved were "traumatised", Asst Comm. Walton said.

Detective Sergeant John Breda underwent emergency surgery.

The detective sergeant had almost paid "that ultimate sacrifice" for doing his job, Police Association of NSW President Scott Weber said.

"We had three police officers who went out there to keep New South Wales safe and one of them was severely injured," he said.

"Let's make sure that every single person in NSW has thoughts and prayers tonight for those officers but especially the officer that is in hospital that’s fighting for his life.

"Every day we go out on the street to protect the people of NSW, we realise that we may not be coming home."

Dt. Sgt Breda is a member of the Sex Crimes Squad, and visited the pub after police on Thursday to issue a public alert about an arrest warrant for Newman.

"The detectives approached the 33-year-old suspect in the beer garden of the hotel and whilst arresting the male, a 45-year-old detective sergeant was stabbed in the chest and abdomen by the offender," Asst Comm. Walton said.

"The two other detectives have both discharged their firearms and stopped the offender, who has fallen to the ground."

Anzac Parade was blocked and the surrounding buildings evacuated as police cordoned off the scene, and Maroubra Road was partly closed during a search for evidence.