The New York City police officer who was hacked with a meat cleaver by a disgruntled homeless person insisted today: ‘I was just doing my job.’

He added: ‘I saw what was happening and I had to help my fellow officers and protect the public.

‘That is what I am paid to do.’

Officer Brian O'Donnell who suffered a six-inch-long scar on the left side of his face, stretching from his forehead all the way down to his chin, said he didn’t think twice about confronting Akram Joudeh, 32, who was involved in a struggle with police colleagues.

Scroll down for video

NYPD Officer Brian O'Donnell was discharged from Bellevue Hospital on Friday, a day after he was attacked by a man with a meat cleaver

O'Donnell appeared to be surrounded by his family as he left the hospital on Friday

The police detective underwent emergency surgery on Thursday to repair the six-inch gash to his face

A horde of fellow NYPD officers were waiting outside of the hospital to cheer on O'Donnell as he went home

He said he saw officers trying to arrest the man who was brandishing the weapon.

Officer O’Donnell had just finished his shift at 19th Precinct and was heading home to his wife Krista and three children who are aged, 12, nine and three.

His brother John, 47, who works at a bar on the strip in Las Vegas, said: ‘I spoke to him when he was in the emergency room last night and today when he got home.

‘He was saying that he was just doing his job and that he acted without thinking about his own safety.

Brian O'Donnell pictured left his his brother John, right, who lives in Las Vegas. The two are pictured above playing golf last month in New York

‘The guy attacked him with the meat cleaver after my brother had rushed across the street and taken him down. The guy was then shot by the other police officers.

‘My brother is a great guy and loves his job. He has been an officer for 19 years and worked through 9/11 which was one of his toughest days.

‘I was talking to him about his bravery and he said he was doing his job.

‘But he did say that maybe the police would now give him a week of sick days.

‘He said: "Maybe I get to come and visit you for a week in Vegas now."'

John added: ‘I am very proud of him and that is typical of him to put others first.

‘He loves his job even though it can be very dangerous as has been shown by this.

‘He is a great guy and he will do his best to get back to work as soon as is possible.

‘Its great that America has police officers like him. ‘

Right before the attack: Video has emerged showing Akram Joudeh, 32, stomping on the parking boot and using a jack to try and get it off his tire near Penn Station just before 5pm

On Friday, O'Donnell was discharged from Bellevue Hospital after undergoing emergency surgery o Thursday for the attack.

Pictures show O'Donnell being wheeled out of the hospital in a wheelchair, a six-inch long scar on the left side of his face, stretching from his forehead all the way down to his chin.

The officer had to be rushed into emergency surgery Thursday afternoon after Akram Joudeh attacked him with a meat cleaver near Penn Station, when the man became upset that his car had been booted.

Earlier Friday, video emerged showing Joudeh trying to hack the boot off of his car before O'Donnell intervened.

Shot: Akram Joudeh, 32, is in hospital after being shot by police during an incident in Midtown on Thursday night

Police said the confrontation began when two uniformed officers encountered Akram Joudeh, 32, trying to remove an immobilizing boot from a parked vehicle.

As the officers approached him, Joudeh pulled out an 11-inch meat cleaver and ran, police said.

Officers chased Joudeh down the street before O'Donnell, who was off-duty at the time, intervened and tried to tackle him.

That's when Joudeh lashed out with the knife, hacking the face of the detective, said the department's top chief, James O'Neill. Officers then opened fire.

'They shot until the threat was stopped,' said O'Neill.

Police fired 18 shots, striking Joudeh at least twice. He was hospitalized Thursday night in critical but stable condition, police said.

Police were called out at around 5pm after Joudeh was seen trying to prize a boot off his car on West 31 St and Broadway. It's believed the man, whose last registered address is in Queens, had been sleeping in the car.

The vehicle had reportedly been parked in the middle of the street, which is located in a busy, tourist-heavy area of Midtown.

When police approached, however, he went into a rage, pulling out the cleaver and fleeing while 'waving it around,' a police spokesman said.

Shot: Joudeh was shot by police on West 32 Street (pictured) around 5pm Wednesday. He had been chased after allegedly trying to prize a boot off his car a block away

Gunned down: Cops fired 18 shots hitting Joudeh (pictured lying down) multiple times after he slashed detective Brian O'Donnell with the 11-inch cleaver

Attack: O'Donnell was off-duty when Joudeh allegedly climbed on a cop car; the detective then attempted to subdue him but received a six-inch gash on his face, cops said

Evidence: The scene had gruesome evidence of the attack, including a towel (left) that had apparently been used to stanch blood, and a cap (right) that had apparently been cut

Weapon: This is the 11-inch cleaver that was used to attack O'Donnell

Fox Exclusive video obtained of man with butcher knife being shot by nypd in front of Manhattan mall. @FoxNews pic.twitter.com/Tdh2RRZ12I — Bryan Llenas (@BryanLlenas) September 15, 2016

A sergeant attempted to stop the suspect - described as sporting scruffy sandals and a beard - with a taser while they ran through the crowded area.

But for reasons unknown it apparently had no effect.

The officers chased him through the heavily-patrolled area to West 32 St, near Penn Station, where he mounted the grill of a marked NYPD car.

Off-duty detective Brian O'Donnell, who was heading to Penn Station, saw Joudeh and attempted to tackle him - at which point, cops say, Joudeh hit him in the face with the cleaver.

Officers tried to talk him into dropping the weapon, police said, but he refused - at which point they fired 18 times, hitting him with multiple bullets, cops said.

Two other cops sustained non-life-threatening injuries. Early reports said that one of them suffered a graze on his back during the gunfire.

Both the cops and the attacker were taken to Bellevue Hospital.

The detective is said to be in serious condition. He was visited by Mayor Bill de Blasio and Bill Bratton, who is on his last day in the job, and was said to be in 'good spirits.'

The other officers are said to be in stable condition.

Chaos: The whole of West 32 Street was closed off while police dealt with the scene

Booted: This is the car that Joudeh was said to have parked in the middle of a road. He was attempting to prize the boot off the front wheel when first approached by cops

Closed: West 32nd Street was closed down after the attack, as police took over the scene. The road runs directly up to Penn Station and Madison Square Garden

Joudeh had a long criminal record with 15 arrests, police reported.

One of those was an August 27 booking for carrying knives near a synagogue, NBC reported.

And according to the NY Post, in 2013 Joudeh was arrested for criminal mischief after smashing a car up with a wooden fence post.

While being arrested he told officers: 'I thought it was a detective's car.'

Police were later seen inspecting Joudeh's car and its contents with bomb-sniffing dogs after the attack.

They were pictured opening up a number of suitcases apparently stored in the vehicle by a Daiymail.com photographer.

However, police said that talk of terrorism was 'off the table' at this point.

The FBI sent agents from the Joint Terrorism Task Force as a 'precaution.'

Bomb dogs: Police used bomb-sniffing dogs to inspect the suspect's car. The clamp he was allegedly trying to remove can be seen on the front wheel

Inspection: The police also inspected suitcases found in the car, which they believe he was sleeping in. The attacker was described as appearing mentally unwell by one witness

A witness told ABC 7 that there were around five or six officers, some in plainclothes, pointing guns at an apparently mentally unstable man with a meat cleaver.

He said police tried to get him to drop the cleaver but he refused and around six or seven shots were fired.

#breaking: #exclusive video of shots fired in downtown manhattan; witness to GR: man attacked police with machete pic.twitter.com/fOc0PSMeQp — Greek Reporter (@GreekReporter) September 15, 2016

Injured: Two other officers were injured; early reports said one was 'grazed' on his back by a bullet. Joudeh is in hospital in critical condition, cops said; the detective is in serious condition

Footage shared on Twitter by @GreekReporter shows police already on the scene when shots are fired.

Several more police cars then rush onto the scene while sirens blare.