The man police say is responsible for killing an NYPD sergeant Friday afternoon fired the first shot in what led to a total of 20 rounds spent at the Bronx scene, according to a preliminary assessment released by an NYPD official.

Manuel Rosales, 35, used a .45 caliber handgun to shoot Sgt. Paul Tuozzolo, 41, in the head and chest as several officers closed in on him on a street in the borough's Van Nest neighborhood shortly before 3 p.m., officials said. 

Rosales also shot and wounded another sergeant, 30-year-old Emmanuel Kwo, police said. A police spokesman said Kwo was released from Jacobi Medical Center on Friday night after being treated for gunshot wounds to his leg.

Authorities on Saturday morning were still tracing the weapon Rosales used as the force investigation division conducts an analysis of the shooting scene, police said.

Kwo and Tuozzolo were fired upon by Rosales, who police said had an extensive rap sheet, while responding to a report that he had broken into his estranged wife's home in the Van Nest neighborhood, according to officials.

Cops received a 911 call about 2:45 p.m. that Rosales had broken into his 29-year-old wife's Beach Avenue apartment, armed with a gun. Their 3-year-old son, a 13-year-old child and a 50-year-old woman were also in the home at the time.

Rosales fled the scene in a red Jeep before cops arrived, NYPD Commissioner James O'Neill said. Police encountered Rosales about a half-mile from the original call, at 2:52 p.m., outside 1575 Bronx River Ave. There, Rosales opened fire on police with the .45-caliber semi-automatic, and cops returned fire.

Patrick Lynch, president of the Patrolmen's Benevolent Association, said a 25-year-old rookie who fired on Rosales had been on the street in field training for just three days.

“His training kicked in,” Lynch said. “He saw a gun come out that window and rounds start being fired and fellow police officers, a sergeant, go down. He responded like a professional with 30 years, meanwhile he has three days. He did well.”

Rosales, from Long Island, was pronounced dead at the scene. Police said he had 17 prior arrests — some of them felonies — in Suffolk County. Court records show the shooting happened while Rosales was out on $1,000 bail following charges of second-degree criminal contempt of court and aggravated harassment in Suffolk County. He was due in court on Nov. 16.

Tuozzolo and Kwo were taken to Jacobi Medical Center, where Tuozzolo, 41, from Long Island, was pronounced dead. Before his release, Kwo was listed in stable condition but "devastated," O'Neill said.

Tuozzolo, a 19-year veteran of the force, leaves behind a wife and two young children.

O'Neill thanked Jacobi's staff for doing as much as possible to try to save Tuozzolo. He added, "I always talk about what a great job this is, but there’s nothing worse than a day like today."

Mayor Bill de Blasio said the city, the NYPD and the 43rd Precinct are in mourning after Tuozzolo's death. "They lost a very good man, a devoted man, a man who committed his life to protecting all of us."

De Blasio’s office ordered all flags at city buildings to fly at half-staff in honor of Tuozzolo, effective immediately. Flags will remain at half-staff until Tuozzolo is laid to rest. 

Gov. Andrew M. Cuomo referenced the "ultimate sacrifice made in the line of duty" in a statement.

"My deepest sympathies are with the families of the officers involved in today’s tragedy in the Bronx, and with Commissioner O’Neill and the NYPD as they cope with the loss of one of their own," he said.

"Very sad. Our thoughts and prayers are with @NYPDnews," Bronx Borough President Ruben Diaz Jr. tweeted.

City Council Speaker Melissa Mark-Viverito tweeted that she was "horrified" to hear of the sergeant's death. "Terrible day for our city," she wrote in the tweet.

"My heartfelt condolences go out to the family of our fallen sergeant, we must continue to pray for the other wounded officer," tweeted Councilwoman Annabel Palma, who represents the district.

The NYPD asked for prayers for Tuozzolo's family and for Kwo as he recovers. 

The last NYPD officer killed in the line of duty was Det. Randolph Holder, who was shot while pursuing an armed suspect in Harlem in October 2015.

In May 2015, Officer Brian Moore, of Plainedge, was fatally shot while on patrol in an unmarked car in Queens.

With Reuters and Newsday