A man wearing a MAGA cap attacked another man with a sword outside a San Francisco roller-skating rink Friday night, police say.

The victim is said to have grabbed the assailant's red 'Make America Great Again' hat during the bloody confrontation before being stabbed in his hand.

He is said to have been approached by the suspect in the MAGA hat and a row broke out.

In shocking images posted online the red hat - a symbol of Trump's 2016 presidential campaign - can be seen laying on the sidewalk surrounded by blood.

Eyewitness David Miles said: 'I came outside. The guy was cut, he was bleeding like you wouldn't believe. He was just gushing blood, so we got the first aid kit from inside and tried to stop the bleeding.'

Miles posted a shocking image of the aftermath of the incident on Facebook. It showed the red hat near a pool of blood.

Other images show the cap left on the floor after the victim, who has not been named, is said to have chased his attacker before realizing the extent of his injuries.

Shocking images posted online show the red hat - a symbol of Trump's 2016 presidential campaign - on the sidewalk surrounded by blood after a man was slashed with a sword

Police say a man wearing a MAGA cap attacked another man outside a roller-skating rink

Miles added: 'This is the last thing you think is going to happen. I'm very, very, very concerned. I don't really know what to think.'

Scott Sweeney, 24, said he heard the attacker shouting homophobic slurs.

He added: '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.'

Police had originally said the victim, who was stabbed in the hand, was wearing the hat, but later changed their statement.

They are now said to be hunting for the sword-wielding assailant after he fled the scene and are searching security footage from the night after they were called to the scene around 9:50 p.m. to reports of a stabbing.

The victim is said to have chased his attacker before realizing the extent of his injuries and being rushed to hospital

The man was attacked Friday night outside the Church of 8 Wheels in San Francisco, police say

Officer Robert Rueca told The San Francisco Chronicle that the unnamed victim, who suffered non-life-threatening injuries, was approached by another man and the two got into an argument.

MAGA (Make America Great Again) was the slogan of Trump's 2016 presidential campaign but the hats have become the subject of increasing controversy in recent months.

Anyone with information is asked to call investigators on 415-575-4444.