TALLAHASSEE, Fla. (AP) _ A Florida man who flashed a gun while trying to prevent four mostly African-American college students from getting on an elevator with him has avoided prosecution by agreeing to serve 50 hours of community service and pay a $100 fine.

The Tallahassee Democrat reports that prosecutors announced the deferral of prosecution agreement Monday for 49-year-old Don Crandall Jr. He also agreed not to possess any firearms for six months.

Police charged Crandall last month with improper exhibition of a firearm. Crandall, who is white, was videotaped trying to stop a group of mostly black young men from entering an elevator at the apartment building, claiming they didn’t belong in the building without a key. The men were students at Florida A&M University.

After the video went viral, Crandall was fired from his job as a hotel manager.