(UPPER DARBY, Pa.) — Heavily-armed U.S. Marshals and Pennsylvania state police opened fire on a wanted ex-cop who on the run for attempted murder, breaking open a hotel room door and firing 52 shots as the man stood in the corner holding a handgun.

Four officers toting an AR-15 rifle, a sub machine gun, and handguns burst into the room Tuesday where Anthony Galla, 31, was waiting with a handgun pointed at them and hundreds of rounds of ammunition stored around him, according to Mike Chitwood, superintendent of police in Upper Darby, Pa., where the shooting occurred.

Galla had attempted to shoot and kill his ex-girlfriend’s new boyfriend earlier in the day in northern Pennsylvania, police said.

After Galla broke into his former girlfriend’s house, he fired seven shots at the new boyfriend, striking him once in the foot, fracturing multiple bones. Galla then fled, and police issued a statewide alert notifying authorities that Galla, who was a former police officer and had military training, was armed and dangerous.

Authorities believed that Galla had an AR-15 rifle and .40 caliber Glock handgun.

“Galla had stated that to take him down it would have to be a suicide by cops or be taken down by shooting,” said Chitwood. “That information was broadcast statewide and the U.S. Marshals state task force took up the hunt for Galla.”

The hunt led swarms of officers to the Summitt Inn Hotel in Upper Darby, where police surveilled Galla with two other individuals. Eventually they entered the hotel, and a man coming down the stairs saw the police officers and took off running, yelling, “I’m not Anthony, I’m not Anthony,” Chitwood said.

They later identified the man as Galla’s brother, who told police he had been trying to get Galla to surrender.

Three U.S. Marshals and one Pennsylvania state trooper then entered the hotel room and opened fire on Galla for about 10 seconds, Chitwood said. Galla died at the scene. Chitwood said the officers fired 52 rounds at Galla, but did not know how many times he had been hit by bullets.

In the hotel room and Galla’s rental car parked outside cops found hundreds of rounds of ammunition, including 120 rounds for an AR-15 rifle, as well as ammunition for a .40 caliber Glock handgun, a bullet proof vest, and a smoke grenade or tear gas grenade like the type used in tactical implementations, Chitwood said.

“It’s more difficult to buy a cheesesteak than it is to buy a gun,” Chitwood said. “This guy was ready for war. This was his last stand type of thing.”

Chitwood said that the investigation, which is still ongoing, found that Galla had cleaned out his bank account before the attempted homicide. He was dressed in military-style camouflage when he was killed in the hotel room.

He had worked in several different police departments but not for long periods of time, Chitwood said. Galla lived in Lebanon County, Pa.

“I thought the shooting was a good shooting,” Chitwood said.”If Galla had access to this AR-15 and all that ammunition he could have cause significant damage. He wanted to die.”