San Francisco police searched Sunday for an assailant they say slashed a man with a sword after the victim tried to remove his “Make America Great Again” hat.

The attack happened Friday night outside the Church of 8 Wheels, a popular roller skating rink in San Francisco’s Western Addition. The victim was struck on the hand with the sword and transported to a hospital with non-life-threatening injuries, police said.

“We are still investigating what led up to the assault with the sword or edged weapon,” Officer Robert Rueca, a police spokesman, said Sunday. “We know the suspect was wearing the hat. During the incident the hat came off of the suspect. The suspect and the weapon remain outstanding.”

Police initially said the victim was wearing the MAGA hat, but revised their statement Saturday.

“I can’t speak to the discrepancy in the information,” Rueca said. “There was a lot of information being put out there that we were still looking to confirm so that may have led to the confusion.”

The red MAGA hat, which has become a universally known accessory for supporters of President Trump, was left on the sidewalk near a pool of blood. Police said the victim had tried to grab the hat when the wearer pulled out his sword and slashed the victim in the hand.

Investigators have spoken with eyewitnesses and are looking for video surveillance footage, Rueca said.

Scott Sweeney, 24, said he and his girlfriend were leaving a liquor store across the street from the rink about half an hour before the attack when the man in the hat came up to them and shouted homophobic slurs.

Sweeney said it seemed like the man was “nervously trying to figure out what to do” and had a large sword tucked into a sheath in the back of his jacket. Sweeney said he didn’t take the weapon seriously at first.

“In my mind I didn’t think it was a real sword until we came out later and police were on the scene and there was blood and the hat on ground,” he said.

David Miles, who goes by the nickname “Sk8father” and started the roller rink at the former Sacred Heart Catholic Church, said he was inside during the dispute and didn’t see the attack but ran out to help the victim, who was “gushing blood.”

“I gotta do something about this, gotta up the security,” he said, noting that he’s considering setting up additional surveillance cameras. “Even though he didn’t come into the church, he could have. This could have been worse.

“This is the last thing you think is going to happen. I’m very, very, very concerned.”

Police have not yet released a description of the attacker. They are asking anyone with information about the attack to call investigators at 415-575-4444.

Chronicle staff writer Joaquin Palomino contributed to this report.

Kimberly Veklerov and Gwendolyn Wu are San Francisco Chronicle staff writers. Email: kveklerov@sfchronicle.com gwendolyn.wu@sfchronicle.com Twitter: @kveklerov @gwendolynawu