Recent attacks on police officers across the country prompted NYPD officials to provide stronger bullet-resistant vests, combat-style helmets and other armor to cops, particularly those responding to active-shooter situations, officials said Monday.

Over $7.5 million in city funds was earmarked in recent weeks to put in rush orders for 6,000 new vests and 20,000 helmets, which are expected to be delivered before the end of summer, according to NYPD Commissioner William Bratton. The authorization comes on top of a previously announced plan to build ballistic armor into the doors of police cars.

Both Bratton and Mayor Bill de Blasio announced the rollout of the new equipment in a news conference at the 84th Precinct in Brooklyn, the home station of Det. Wenjien Liu and Det. Rafael Ramos when they were assassinated while sitting in a patrol car in December 2014.

“These new helmets, the new vests, the new ballistic armor for police cars will all provide much more protection to the men and women who protect us,” de Blasio said.

“We made this decision quickly in light of what we saw happening around us and I think it is absolutely the right decision,” the mayor said, referring to recent terror attacks, notably a sniper attack on police in Dallas during a peaceful protest in which five police officers were shot dead and several others wounded.

Chief of Department James O’Neill said beginning in September police officers will carry the new ballistic vests and helmets in their squad cars. In a demonstration, two officers from the 84th Precinct got out of their car and put on the vests and helmets in less than 30 seconds.

advertisement | advertise on newsday

The vests will be in addition to the normal body armor police wear and will provide an extra measure of protection against high-caliber weapons. Officers with the Strategic Response Group, Critical Response Command and Emergency Services Unit already carry the gear.

O’Neill said the helmets are similar to the one which saved the life of an officer during the Orlando nightclub shooting in June, while the new vests were a “step higher” than the current vests police wear under their uniforms.

Brooklyn Borough President Eric Adams said law enforcement officers need the best equipment to deal with active-shooter situations and terror attacks.

“We will not have a police department that brings a knife to a gunfight,” said Adams, a former police officer. “We will bring the right equipment to fend off anyone that endangers the public.”

Bratton said he decided to move ahead with the project after two officers were shot at, but not injured, two weeks ago in Brooklyn.

However, Patrolmen’s Benevolent Association President Patrick Lynch said in a statement that while the vests and helmets would provide protection, police officers need more long rifles to counter “the immediate threat of a shooter.”