Hundreds of people took to the streets of Edinburgh to search for three-year-old Mikaeel Kular, in a mood of optimism that it was only a matter of time before he was found. But on Saturday night police were trying to work out how he ended up dead in woods nearly 30 miles away.

Police confirmed that a 33-year-old woman had been arrested and charged as part of the investigation into the death of Mikaeel, whose body they confirmed they found earlier in Kirkcaldy, Fife. They said the woman would appear at Edinburgh Sheriffs Court on Monday morning. The developments were described by Scotland's First Minister, Alex Salmond, as "the news we have all been dreading".

As detectives attempted to piece together the events that led up to, and followed, Mikaeel's disappearance, community leaders in Edinburgh urged people not to jump to conclusions about what had happened.

Download the new Independent Premium app Sharing the full story, not just the headlines

However, social media were awash with unsubstantiated speculation about the death; police said they were aware of racist comments on Twitter. At least one person, from the Greater Manchester area, was being investigated over an allegedly offensive tweet.

Shape Created with Sketch. In pictures: The search for Edinburgh boy Mikaeel Kular Show all 14 left Created with Sketch. right Created with Sketch. Shape Created with Sketch. In pictures: The search for Edinburgh boy Mikaeel Kular 1/14 Edinburgh A house in Kirkcaldy, Fife, believed to belong to Mikaeel's aunt, the sister of his mother, was sealed off by police during the night 2/14 Edinburgh A small wooded area close to the bungalow in Kirkcaldy has also been cordoned off and was being guarded by police officers 3/14 Edinburgh Assistant Chief Constable Malcolm Graham said the body of a young child was recovered in Fife just before midnight. Forensics were later on site 4/14 Edinburgh The grim discovery comes after days of desperate searches by hundreds of volunteers. Here a tribute was left outside the bungalow in Kirkcaldy 5/14 Edinburgh Superintendent Liz McCainsh holds a photo of missing 3-year-old boy Mikaeel Kular as part of the extensive search 6/14 Edinburgh Forensic teams check a property during the search for missing three-year-old boy Mikaeel Kular 7/14 Edinburgh Police officers search the Ferry Gait Crescent neighborhood of Mikaeel Kular near his home 8/14 Edinburgh Police conduct a search on Ferry Gait Crescent where Mikaeel Kular has gone missing from his home 9/14 Edinburgh A police officer stands guard near the home of missing boy Mikaeel Kular 10/14 Edinburgh Members of a Mountain Rescue team prepare to search local gardens for missing three-year-old boy Mikaeel Kular 11/14 Edinburgh A member of a Mountain Rescue team searches local gardens for missing three-year-old boy Mikaeel Kular 12/14 Edinburgh Members of the coastgaurd search the coastline near Cramond for missing 3 year-old boy Mikaeel Kular in Edinburgh 13/14 Edinburgh Members of the coastgaurd search the coastline near Cramond for missing three-year-old boy Mikaeel Kular 14/14 Edinburgh Coastguard officers search the shoreline near Crammond, after three-year-old Mikaeel Kular went missing from his home in Ferry Gait Crescent 1/14 Edinburgh A house in Kirkcaldy, Fife, believed to belong to Mikaeel's aunt, the sister of his mother, was sealed off by police during the night 2/14 Edinburgh A small wooded area close to the bungalow in Kirkcaldy has also been cordoned off and was being guarded by police officers 3/14 Edinburgh Assistant Chief Constable Malcolm Graham said the body of a young child was recovered in Fife just before midnight. Forensics were later on site 4/14 Edinburgh The grim discovery comes after days of desperate searches by hundreds of volunteers. Here a tribute was left outside the bungalow in Kirkcaldy 5/14 Edinburgh Superintendent Liz McCainsh holds a photo of missing 3-year-old boy Mikaeel Kular as part of the extensive search 6/14 Edinburgh Forensic teams check a property during the search for missing three-year-old boy Mikaeel Kular 7/14 Edinburgh Police officers search the Ferry Gait Crescent neighborhood of Mikaeel Kular near his home 8/14 Edinburgh Police conduct a search on Ferry Gait Crescent where Mikaeel Kular has gone missing from his home 9/14 Edinburgh A police officer stands guard near the home of missing boy Mikaeel Kular 10/14 Edinburgh Members of a Mountain Rescue team prepare to search local gardens for missing three-year-old boy Mikaeel Kular 11/14 Edinburgh A member of a Mountain Rescue team searches local gardens for missing three-year-old boy Mikaeel Kular 12/14 Edinburgh Members of the coastgaurd search the coastline near Cramond for missing 3 year-old boy Mikaeel Kular in Edinburgh 13/14 Edinburgh Members of the coastgaurd search the coastline near Cramond for missing three-year-old boy Mikaeel Kular 14/14 Edinburgh Coastguard officers search the shoreline near Crammond, after three-year-old Mikaeel Kular went missing from his home in Ferry Gait Crescent

Ms Kular, a mother of five, had told detectives that she discovered her son was missing on Thursday morning after putting him to bed the previous night. His brown jacket, multicoloured gloves and shoes were gone.

Initially police said Mikaeel might have left the flat by himself, but neighbours expressed doubts that a child of three would have been capable of opening the heavy main door to the apartment block.

The charges followed the discovery of the body late on Friday night. Assistant Chief Constable Malcolm Graham, who looked visibly shaken when announcing the news a short time later, Almost 24 hours later they confirmed the body was indeed that of Mikaeel".

"A person has been detained in connection with the recovery of the body and members of Mikaeel's family have been informed of the recovery," he said. "Our thoughts and sympathies are with them at this time."

ACC Graham praised the community in North Edinburgh who turned in large numbers to help search for the missing child before his body was discovered. He said a further 500 calls had been received from the public looking to help officers with their inquiries.

The house in Kirkcaldy and nearby woods were cordoned off by police as forensic teams scoured the area on Saturday. At about 4pm, an ambulance reported to be carrying the boy's body was seen leaving the area.

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

Ms Kular, a beauty therapist, is said to have separated from a man she married in her early twenties and was living with a new partner. She previously wrote a light-hearted post about herself online, saying that she lived with "just me, myself and I ... oh yeah, with a brood of five monsters, six if you count the man indoors!"

A steady stream of mourners left flowers and cuddly toys near the Kular family home in Ferry Gait Crescent, in the Drylaw area of Edinburgh. One note read: "This is so sad and a great loss to our street in Ferry Gait Crescent."

For two days, hundreds of local people had turned out to help search for Mikaeel, spending hours scouring the local streets and nearby coastline. Frank Arthur, 72, who lives in the flat above Ms Kular, said that he was finding the news "difficult to come to terms with". "Everybody has been rooting for that little kid. There's an awful lot of people who gave up time to go out and look for him."

Irvine Welsh, the author, who grew up in the area and had repeatedly taken to Twitter to encourage local people to help "bring the wee man hame", also expressed his sorrow. "So sad about wee Mikaeel but couldn't be more proud of where I come from & the amazing people there who tried everything to help out," he tweeted.

Denise Fergus, the mother of James Bulger, the two-year-old murdered in Liverpool in 1993, tweeted her condolences, saying: "My heart is aching for that poor boy Mikaeel Kular brings it all back so sad."

The Scottish parliamentarian Colin Keir, who had helped to look for Mikaeel, said the local community in Edinburgh was feeling "battered and bruised". He added: "I know exactly how these people are feeling. It's difficult not to get personally involved." But Mr Keir urged people not to let their emotions result in a rush to judgement.

"There's a post-mortem that has to happen. We need to find out how the young Mikaeel died and when he died, then we can start piecing things together," he said.

Local councillor Cammy Day, who was due to speak at a memorial service for the young boy at a local church on Saturday night, said the community was "absolutely devastated".

He praised the "wonderful, strong community spirit" displayed during the search for the boy, and said he hoped it would not be damaged by "the odd few ridiculous comments" made on social media.

"I'm hopeful there will be no repercussions locally. I know the police are doing something on that," Mr Day said. "We should not be making any assumptions, we should be leaving the investigation to police."