Four months in jail and community service is the penalty a former New York City police officer has ended up paying for killing a 22-year-old student last year in a drunken-driving accident in Queens.

At a brief appearance in Queens Criminal Court on Friday, the officer, Neville Smith, was released from jail to start 500 hours of community service and alcohol counseling before he is formally sentenced in the case in September.

Under the terms of a plea deal with the Queens district attorney, Mr. Smith had already fulfilled the jail time he is required to serve — four months of a six-month sentence, his lawyer, Anthony M. La Pinta, said after the appearance before Judge Gia L. Morris.

“Mr. Smith takes full responsibility and is heartbroken over the death of this young girl,” Mr. La Pinta said. “And he prays for her family every day.”