A teenager fired three shots at a police officer Saturday night in South Philadelphia, just one day after two officers were injured by gunfire in a mass shooting in West Philadelphia.

The officer in Saturday night's shooting was not hit by the gunfire, and police said they were able to apprehend the suspect without firing a single shot.

According to authorities, the officer was on patrol around 11:45 p.m. on the 800 block of South Street, a busy entertainment and shopping district, when the officer noticed the strong smell of marijuana as a group of people passed him.

When the officer tried to get the attention of those in the group, one of the men ran east on South Street and then north on nearby Darien Street, police said.

The policeman chased the man into a driveway in the 500 block of South Darien Street. As the officer approached the driveway, the suspect fired at him at least three times, police said.

The officer was able to duck for cover and radio in a description of the suspect. Responding officers found a 19-year-old, believed to be the gunman, hiding in a back yard on the 500 block of South Darien Street, police said.

The suspect, whose identity has not been released pending the approval of charges against him, was taken to Methodist Hospital with a right ankle sprain suffered while jumping over fences as he tried to run away from police, authorities said.

Smoking marijuana in public in Philadelphia has been decriminalized since October 2014. Those caught smoking marijuana in public are issued $100 citations.

Assault on a police officer with a firearm, however, is a first-degree felony and carries a maximum sentence of 40 years in prison.

The shooting marked the second time that police in Philadelphia faced gunfire within a little more than 24 hours.

Around 11:20 p.m. Friday in West Philadelphia, 25-year-old Nicholas Glenn shot six people - including two police officers - before other officers shot him to death.

Five of Glenn's victims - including Philadelphia Police Sgt. Sylvia Young, who was shot six times, and University of Pennsylvania Officer Eddie Miller, who was shot twice - survived. Both officers remained in stable condition Sunday at Penn Presbyterian Medical Center.

Glenn's sixth victim, 25-year-old Sara Salih, died from her injuries.