Videos showing a San Francisco police officer bumping into a skateboarder who was speeding down a street by Dolores Park, sending the young man crashing into a squad car, were raising questions Wednesday about the officer’s intentions.

Police officials said the department is investigating the incident, which happened during an informal skateboarding competition Tuesday night that drew dozens of officers to Dolores Street on the east side of the park, resulting in confrontations between police and a large group of skaters and onlookers.

In two videos posted on social media, the officer appeared to put his left shoulder or arm in the path of the skateboarder, who was riding downhill.

The skateboarder collided with the officer and veered a few feet to the right, slamming into and over the front of the patrol car — which had been parked in the street to block it — and falling to the pavement, grabbing his right leg in pain.

Several other skateboarders and bystanders who witnessed the crash shortly after 7 p.m. reacted angrily, saying the officer appeared to have caused the contact when he could have allowed the skateboarder to pass by.

Officer Robert Rueca, a department spokesman, said an investigation is under way, and that officers are working to identify the injured skateboarder, who “was uncooperative and left on his own accord.” Rueca said police checked with hospitals, but were unable to locate the man .

“We tried to assess his injury or injuries, and he refused any medical attention and refused to speak with us,” Rueca said. “We don’t know what the intent of the skateboarder was. It’s difficult to say what actually occurred. We can only deal with the actual parties that were involved. Without his statement, there is still a lot of questions that are unanswered.”

The officer, who was not identified, was taken to a hospital for treatment of unspecified injuries. Rueca said the officer gave a statement to investigators, which the department did not release.

Skateboarders had gathered for an exhibition of “hill bombing,” riding down the street at high speed. Organizers did not have a permit. Police said they went to the scene after neighbors complained about the disruption and their inability to use the street, and were met with immediate resistance.

Andrew Bahena, 28, said he arrived just before the collision, as police cars lined up to block the road. He noticed an officer “looking super agitated,” directing one car to close up a gap through which some skateboarders were skating.

“It basically became a game of cat and mouse,” he said. “The skaters were trying to get by the cops in the space available to them, kind of like, ‘Oh we’re punking you, we’re winning.’ It was kind of funny, but I understand that it was frustrating for the police officers. The crowd was yelling whenever someone made it through.”

Three skateboarders made it through the gap when the officer walked “to the only path they could get through,” Bahena said. That was when Bahena said he saw the officer raise his arm.

“Even if it was a collision, it was a collision that was contrived,” he said. “The cops were being antagonized and he antagonized the collision. From there, things escalated really quick. Within 10 seconds of that kid going down, the skateboarders were hitting their boards on the ground and making noises.”

For more than an hour, police said, skaters shouted and threw objects at officers. More police arrived to try to break up the gathering and relieve tension in the crowd of roughly 400. Rueca said officers were unable to speak to witnesses at the scene, but had body-worn cameras that should shed some light on what occurred.

Rueca said one skater smashed his board into a marked police vehicle and shattered the window. The standoff shut down Dolores Street between 18th and 20th streets until around 9 p.m. No arrests were made, and rumors that officers fired rubber or beanbag rounds into the crowd were untrue, Rueca said.

“We maintained a distance to keep it from escalating, and with that, people still got injured,” he said. “We saw skaters falling all over the place who were not involved.”

A man wiped out during the competition and was taken to the hospital, authorities said. That crash was also captured on video.

Bahena, who was visiting from Mexico City, said he thought the officer’s actions were calculated.

“I think he was trying to do it in a way where he knew he could get away with it,” Bahena said. “He knew he couldn’t just go up and clothesline that guy, but to let several of them go by before, and then to put himself in that path?

“These kids were just trying to skate,” he said. “He could have killed that kid.”

Skateboard crashes

To see the videos: http://bit.ly/2uSNDu7.