The judge at the Grenfell inquiry has addressed the "shocking" video of a model of the tower being burned as he opened another day of the hearing.
Sir Martin Moore-Bick is leading the inquiry into what happened at the high-rise apartment block in west London in June last year, and is continuing to hear from survivors who were in the building on the night.
Before he called witnesses, he noted the video which emerged on Monday, showing a replica of the tower being lit on a bonfire.
Five people from south London have handed themselves into police, and were arrested on suspicion of a public order offence, after the footage emerged online.
Sir Martin said: "The inquiry is aware of the offensive video that was posted online yesterday.
"It must be shocking and distressing to all those involved… whatever form their involvement took, whether as bereaved, survivors or indeed members of the wider community.
"I am very pleased to hear that the authorities are taking the matter very seriously and that an investigation is underway."
The Metropolitan Police said they arrested two 49-year-olds, a 55-year-old, a 19-year-old and a 46-year-old after they arrived at the police station.
The fire at the west London tower block killed 72 people.
Theresa May was one of scores of people who criticised the actions in the video, alongside Grenfell charities, dozens of MPs including Home Secretary Sajid Javid, and the London Fire Commissioner.
Earlier, Scotland Yard said its Grenfell Tower investigation team was "taking this matter very seriously", adding: "Any offences that have been committed will be fully investigated."
Commander Stuart Cundy said: "I am frankly appalled by the callous nature of the video posted online.
More from Grenfell Tower
"So many people lost so many loved ones, and many more have been deeply affected. To mock that disaster in such a crude way is vile."