A man wanted over alleged child sex offences has been shot dead after stabbing a senior police detective in the beer garden of the Maroubra Junction Hotel in Sydney's south-east.

Key points: Nick Newman, 33, was wanted over alleged child sex offences

Nick Newman, 33, was wanted over alleged child sex offences He was shot dead near the Maroubra Junction Hotel on Australia Day

He was shot dead near the Maroubra Junction Hotel on Australia Day The senior detective he stabbed is fighting for his life in hospital

Witnesses reported hearing "four of five gun shots" as Nick Newman, 33, was killed about 3.25pm at the hotel on Anzac Parade.

The detective sergeant was one of three officers who were there to arrest the man as part of an investigation with the Child Abuse and Sex Crimes Division.

NSW Police Assistant Commissioner Mark Walton said the situation escalated quickly and the 45-year-old officer was stabbed in the chest and abdomen.

He was taken to St Vincent's Hospital where he remains in a critical condition.

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

Assistant Commissioner Walton spoke highly of the officer involved.

There was a large police presence at Maroubra Junction. ( Twitter: @HamiFaraj )

"He's very well regarded by his peers and there will be a lot of people who are very concerned about his condition tonight," he said.

Lara Alexander said she was alerted to the incident by gunshots.

"I was out the back vacuuming when all of a sudden I heard four or five gunshots," she said.

"I immediately heard sirens and I went outside to have a look.

"I saw a man on a stretcher getting carried out of the pub and another man come out of the pub in handcuffs."

'It was really chaotic'

Nearby Maroubra Road has been closed and there is a large police presence in the area.

"I've never heard anything as loud or distinct as that. It was very loud and very alarming," Ms Alexander said.

"It was really chaotic. There were lots of police rushing in there and civilians running out."

Sorry, this video has expired NSW Police Assistant Commissioner Mark Walton details the Maroubra incident

In a tweet, NSW Police Minister Troy Grant said his thoughts and prayers were with the family and colleagues of the injured officer.

Noel Whelan is staying at the pub, and was nearby at the time of the incident.

"I heard the siren was going off — police, one car, two cars, three cars, six or seven police cars," he said.

There was a large police presence outside the Maroubra Junction Hotel. ( ABC News: Nour Haydar )

"We were just asked to get out of here and go.

"It was sad to see it happen on Australia Day, you know, when people are out enjoying themselves."

The ABC understands the incident was not linked to Australia Day celebrations or protests and witnesses have been encouraged to contact police.