A Florida man has been sentenced to six months in prison for shooting a gay man with a BB gun at a pride parade.

Cornelius Davis on Wednesday pleaded guilty to felony battery. The 21-year-old originally faced a charge of aggravated battery with a deadly weapon.

Sentenced by a Pinella County judge, the court hear that Davis shouted homophobic slurs at a group of men at St Pete Pride in June 2013.

He then fired the BB gun and hit one man, who was not seriously injured.

Davis later admitted that he was upset by the attire worn by the marchers.