PHILADELPHIA -- Police here say an officer was shot three times in the arm by a man who ambushed him as he sat in his marked police cruiser late Thursday night.

Police Commissioner Richard Ross -- who was sworn in Tuesday -- called the shooting an attempted execution.

Ross says Officer Jesse Hartnett returned fire, hitting the suspect at least three times.

Get Breaking News Delivered to Your Inbox

Police say the suspect fired 13 shots at point blank range that hit Hartnett and his car in an intersection.

Both were taken to area hospitals.

Sources tell CBS Philadelphia the suspect has given a full confession, saying he did it in the name of Islam.

A gunman takes aim at a Philadelphia police officer Jan. 7, 2016, in a still taken from police camera footage. Philadelphia police

There's no word on condition of the suspect, 30, but police say he was shot in his side, reports CBS Philly.

Hartnett, 33, a five-year veteran of the force, underwent surgery, reports CBS Philly. He suffered a broken arm and facial injuries.

Ross says Hartnett's arm suffered significant damage and he has a long road to recovery, but is expected to be OK. "Fortunately, he's awake, he's coherent," the station quotes him as saying.

Ross says the shooting was unprovoked.

Police have video of the incident, he says, adding that, "When you look at the video, this is absolutely one of the scariest things I've ever seen. This guy tried to execute the police officer. The police officer had no idea he was coming."

The suspect approached the cruiser from behind, then attempted to run away after shooting Hartnett, but was quickly apprehended by other officers.

There was word on whether the suspect and officer knew each other or whether the shooting was a random attack.

Jim Kenney, who is in his first week as mayor of the nation's fifth largest city, said, "There are just too many guns on the streets and I think our national government needs to do something about that."

His statement comes on the heels of President Obama's announcement Tuesday of his plan to tighten control and enforcement of firearms in the U.S.