A Nassau County police officer shot two years ago sat in a Mineola courtroom Tuesday as the man who pulled the trigger was sentenced to 30 years in prison.

"He got what he deserved and I just want to move on with my life at this time," Officer Mohit Arora said in a soft voice after the court session was over. "I'm just fortunate to be alive. It was a traumatic experience."

Minutes earlier, Arora and about 40 of his police union colleagues had sat in County Court as Judge Philip Grella imposed the sentence on Cong Xu, 22, a Chinese national who lived in Brooklyn at the time of the shooting.

storyOfficial: Officer in stable condition after shootingstoryShot cop had previous close call while on dutystoryCouple held at gunpoint before cop shooting

Xu, listening to the proceedings through a Mandarin interpreter, did not speak. His attorney, Scott Tulman of Manhattan, said his client apologized to the officer.

"Things went very, very wrong. He is remorseful," Tulman said.

Arora, who joined the department in 2007, was shot in the groin on Aug. 13, 2013, after he and other officers responded to a report of a burglary in progress at a home in New Hyde Park. He was hospitalized for 10 days and was out of work for months.

advertisement | advertise on newsday

The officer is back on full duty but has not completely recovered, he said.

"It's a slow process," Arora said. "I was seriously hurt and it will take some time to heal."

Xu had agreed to the sentence when he pleaded guilty in February to first-degree assault and first-degree burglary. As part of the deal, prosecutors dropped the charge of attempted murder of a police officer. He faces 10 years of parole after his release from prison.

Grella took the plea after telling Cong that doctors who conducted a court-ordered mental test had found him fit to stand trial. He also told Cong that he could be deported later since he is not a U.S. citizen.

Cong, who had worked upstate as a waiter, admitted after his arrest that he fired at least three gunshots while fleeing a Campbell Street residence after the homeowner awoke and dialed 911.

He also said he saw police outside as he tried to find his getaway car and ignored orders not to move before opening fire toward a nearby lawn.

Police caught Cong and his getaway driver, Renhang Qiu, then 22 and living in Brooklyn, in the area after the break-in.

Renhang has pleaded guilty as part of a cooperation agreement with prosecutors and agreed to a 7-year prison sentence. He admitted that he is related to one of the owners of the targeted home.

advertisement | advertise on newsday

Acting Nassau County District Attorney Madeline Singas joined Arora and his police colleagues at a news conference outside court after the sentencing and reflected on how close a call it had been for the officer.

"Another day, it could have been another story," she said. "This case is a grim and vivid reminder of the dangerous work that our Nassau County police officers do every day to ensure our safety and the integrity of our homes."