Florida resident Lane Pittman jammed out the US national anthem on his electric guitar at an Independence Day party, only to be arrested by police.

An online video, apparently posted by Pittman, shows him performing a stadium rock-style rendition of "The Star-Spangled Banner", reportedly drawing a crowd of 200 people, in Jacksonville.

After he finished Pittman was arrested for breach of the peace.

In comments posted with the video Pittman explains that he originally set up to play in the street but was asked by a police officer to move back onto the pavement, and that having done so he assumed he could rock out legally.

"I do not promote deliberately defying authority," he wrote.

"I endorse good character and fun times within the system. I did not have a drop of alcohol in my system and was just trying to be as patriotic as I can, legally, on the day of our independence."