A New York police officer was fired after driving into a group of people while allegedly drunk, killing a MIT undergraduate and seriously injuring three others. Two colleagues who were drinking with the officer that night were placed on modified duty.

The victim, 21-year-old Andrew Esquivel, was walking with a group of friends Saturday around 3 a.m. when he and Officer Nicholas Batka drove over the curb and barreled into them with his sports utility vehicle.

Esquivel was killed and three others survived with severe body trauma, officials said. Bystanders at the scene of the crash in Brooklyn’s Williamsburg neighborhood trapped Batka in his car and tended to the victims, who were left bleeding on the ground, according to The New York Daily News.

“I ran over and this girl’s leg was in half,” bystander Ryan Carpenter told the Daily News. “I took my shirt off and tried to stop her from bleeding while trying to calm her. She kept screaming.”

Police said that the 28-year-old officer was just four hours away from starting his shift with the Transit Borough Manhattan Task Force. He was arrested but refused a breathalyzer test. He has been charged with vehicular manslaughter, driving under the influence and criminally negligent homicide and was immediately fired.

Batka, who joined the force in January 2015, had been drinking with two of his friends and colleagues, both of whom have been placed on modified duty “for the good of the department,” a police source told WPIX.

Esquivel was a student at the Massachusetts Institute of Technology, and was in New York on an internship at the mobile marketing company Appboy. He was set to earn his Bachelor’s Degree in computer science and electrical engineering next year.MIT Chancellor Cynthia Barnhart released a letter to the University Community on Monday concerning the accident.

“On behalf of the entire MIT community, our deepest sympathy to Drew’s family and friends,” she wrote. “To Sophia and James, we extend our best hopes for their recovery and we offer them and their families any support we can. And to the larger circle of their MIT friends and connections, we join you in your shock and grief.”

Last week, a Manhattan federal judge ruled that two men who were shot by an intoxicated police officer in 2014 have standing to sue that officer’s supervisors for tolerating an “atmosphere of indifference to alcoholism.”

An NYPD spokesman told the Daily News that the police department has a Counseling Services Unit to assist officers struggling with addiction or financial problems.“The Department's objective, at all levels, is the early detection and referral of its personnel for evaluation and treatment,” the spokesman said.