A 20-year-old man has appeared in court on a firearms charge following an incident in Glenrothes.
Police, including armed officers, were called to the town centre on Saturday around 11pm, following concerns from members of the public.
Police said two men were subsequently arrested, with a 26-year-old later released without charge.
Steven Reid, whose address was given as Fife, appeared in private at Kirkcaldy Sheriff Court in connection with the incident.
He faces a charge of carrying a firearm in a public place and another relating to threatening or abusive behaviour.
Reid made no plea and the case was committed for further examination.
He was released on bail.