A gunman in Pennsylvania surrendered after a SWAT team negotiator sang him the song “White Christmas,” according to the Chester County District Attorney’s OfficeNathaniel Lewis, 34, faces charges of attempted homicide, aggravated assault, and other crimes.

This all started with a well-being call on Christmas night. A relative voiced concern about the suspect, so cops from the East Vincent Township Police Department swung by the residence at about 9 p.m., prosecutors said. They learned that Lewis, who was separating from his wife and acting “erractically,” had a rifle, so they called over SWAT, authorities said.

Negotiators began trying to talking him out of it. The situation escalated with Lewis allegedly opening fire at cops from inside his home. Bullets struck an armored police vehicle, a civilian’s car, and a nearby home, prosecutors said. Officers returned fire.

Nonetheless, Lewis gave up after a negotiator agreed to sign the song “White Christmas.” He was taken into custody Wednesday morning at about 7 a.m.

Lewis was described as belonging to the National Guard. Court records show he has no attorney of record, but is scheduled for a hearing January 7. Lewis is being held at Chester County Prison, prosecutors said.

“Incidents like this are why our SWAT team trains constantly,” East Vincent Police Chief Matt Williams said in a statement. “Despite the extreme danger to the police officers, the team responded calmly and professionally, resulting in the eventual surrender of the defendant.”

Chester County District Attorney Thomas Hogan said he brought out cookies to the SWAT team members.

“This being SWAT, they ate the cookies, made fun of each other, and went home to their families, quietly satisfied with a job well done,” he wrote in a Facebook post. “All of Chester County says thank you.”

[Image via Chester County District Attorney’s Office]