Elsa Waithe injured her ribs after a police officer shoved her into a metal railing in Brooklyn, video of the incident showed, during a protest against police-involved killings on April 14, 2015. View Full Caption Keegan Stephan

BROOKLYN — An NYPD officer is under investigation after he shoved a protester causing her to fall on to a metal tree guard and injure her ribs at Tuesday's police demonstration, police and friends of the woman said.

The unidentified policeman was caught on video shoving Elsa Waithe, 27, a Brooklyn-based standup comedian, during a confrontation with officers as the protest group marched up Flatbush Avenue toward Prospect Park about 5:30 p.m.

Keegan Stephan, 31, who was riding his bike with the group said police started grabbing people walking on the street and arresting them.

“Suddenly, the police made some very violent snatch-and-grab arrests,” Keegan said. “This terrified the crowd, so the crowd started running.”

Keegan said police then corralled a large group of protesters on the sidewalk on Flatbush Avenue near Seventh Avenue and started to arrest protest organizers.

“As they were doing this they were shoving people out of the way,” Keegan said. “They were very physical with everyone. One of them decided to shove Elsa.”

“The railing hit her in the square of her back,” Keegan said.

Waithe was taken to Methodist Hospital without being arrested.

Keegan didn’t realize how badly she was injured until he visited her later in the evening.

“I just broke down crying after seeing her in the hospital,” he said. “She could barely move in the hospital, she could barely stand.”

She was released at about 1 a.m. Wednesday.

An NYPD spokeswoman said there is an Internal Affairs Bureau investigation into the incident.

The Civilian Complaint Review Board has not yet received a complaint about the incident, a spokeswoman said.

There were 42 protesters arrested Tuesday, some of whom blocked traffic on the Brooklyn Bridge, and two police officers were injured during the protest.