President Trump called for getting “tougher on street crime” after a gunman wounded six Philadelphia police officers during an eight-hour standoff Wednesday.

​”The Philadelphia shooter should never have been allowed to be on the streets. He had a long and very dangerous criminal record. Looked like he was having a good time after his capture, and after wounding so many police​,” Trump wrote Thursday on his Twitter account. “Long sentence – must get much tougher on street crime!​”​

Narcotics officers arrived at the row home in North Philadelphia on Wednesday afternoon to serve an arrest warrant when the man opened fire on them, pinning down two cops in the home.

​The injured officers were treated and released from the hospital.

The gunman, identified as Maurice Hill, has a ​long history of drug and gun convictions and of resisting arrest.

​Hill finally surrendered after officers fired tear gas into the home.

​Trump’s tweet comes amid a renewed debate in the country about gun control measures after the mass shootings earlier this month in El Paso, Texas, and Dayton, Ohio, that killed 31 people.

​After the shootings, Trump spoke out in support of legislation for background checks on gun sales. ​

​Earlier this week, the president said he had spoken to Sen. Mitch McConnell and said the majority leader ​”wants to do something” on background checks.

​McConnell, a Republican from Kentucky, said background checks and “red flag” measures would be considered when Congress returns in September from its August recess. ​