A man has appeared on petition at Dunfermline Sheriff Court charged with murder.
Daniel Ross, 26, was charged following an incident at an address in the Abbeyview area of the town last Thursday.
Ross whose address was only given as Dunfermline made no plea or declaration and was remanded in custody.
He has also been charged with assaulting a police officer brought under the Police and Fire Reform (Scotland) Act and is expected to appear again next week.
His brief appearance in private follows the discovery of the body of Gavin Ross after police entered a flat in the Abbeyview estate at around 8.30pm on Thursday.
It is understood that the body was discovered in a second-floor flat next door to Abbeyview Library and the Abbey News shop.
Police forensic teams remained at the scene of the incident throughout Friday, with officers in white suits entering and leaving the property and two police officers standing guard at the front and the rear of the premises.
Members of the close-knit community said that they were “in shock” as news of Mr Ross’ death emerged.
One shopkeeper said that he had heard the victim had not lived in the area long and was originally from Kennoway.
The family of Gavin Ross have since paid tribute to the 28-year-old, describing him as “a much loved son, father, brother and nephew”.
They continued: “(He) will be greatly missed by everyone who knew him.”
The statement, issued through Police Scotland, added: “We are still in shock with the loss of Gavin and we respectfully ask to be left alone to grieve in private at this very difficult and sad time.”