King Charles expressed his "sympathy and empathy" for the people of Southport when he travelled to meet survivors of the knife attack that claimed the lives of three young girls.
Crowds cheered as he arrived in the Merseyside town shortly after 13:30 BST, where hundreds of tributes have been left to the victims.
During a private meeting the King heard about the experiences of some of the young children who were attacked, and also signed a book of condolence.
The monarch also met regional leaders and heard from frontline staff representing Merseyside's police, fire and rescue and ambulance services at Southport Community Fire Station who responded to the attack.
Bebe King, six, Elsie Dot Stancombe, seven, and Alice da Silva Aguiar, nine, died when a knifeman attacked at a Taylor Swift-themed dance class on Hart Street, on 29 July.
Ten others were seriously injured including yoga teacher, Leanne Lucas, 35, who has recently been readmitted to hospital.
Patrick Hurley, MP for Southport, met the King at the fire station, and said afterwards: "The town's emotions were raging and they still are very raw and he was very empathetic.
"He was very keen to express his sympathy and empathy. Very keen to make sure the people of Southport know that from the symbolism perspective, the country's heart goes out to the people here."
People began to gather outside the town hall from about 11:30 BST to catch a glimpse of the King.
The King stopped to look at the flowers and cuddly toys and greet some of those gathered before going inside the town hall building to meet some of the children who survived the attack, their families and the police liaison team working with them.
He walked around the tributes, waving to the crowd and shaking some hands, and was applauded as he walked into the building.
Balloons in the shape of stars, hearts, a disco ball and the girls' ages were among the tributes and messages were placed in frames.
One read: "God has gained three beautiful new angels. May you dance forever in heaven and be at peace."
Businessman John Hayes who was one of the first people on the scene of the stabbings was among those who met the King.
Walking with the aid of crutches as he left the event, he said: "It was lovely to meet him.
"I found him quite engaging, quite easy to talk to."
Mr Hayes said: "I think he only arrived in Balmoral yesterday so for him to come all the way to Southport today to see people is very kind of him.
"And I’m sure everybody who met him got a lift from that."
The 63-year-old heard children’s screams from the dance class on Hart Street and ran to confront the knifeman. He previously told OceanNewsUK he was "hugely upset" he could not have done more to protect the children.
The King, who has been receiving cancer treatment this year, previously issued a statement in the wake of the stabbing, relating how he was "profoundly shocked to hear of the utterly horrific incident".
Funerals have recently been held for Alice da Silva Aguiar and Bebe King, while a number of vigils for the victims have also taken place.
He had called for unity after unrest and disorder spread across England in the days following the attack.
Outside the building, the King met members of the community who had helped in the aftermath of the attack.
Paige, Harriet, Naomi, all aged 13, and 10-year-old Emie said they had raised £2,000 for Alder Hey Children's Hospital by selling lemonade. They said they were “excited and nervous” to meet the King.
Joanne Martlew, a retired emergency service worker, said she was driving past the dance class on the day of the attack when she saw victims coming out and went to help six of those injured.
She said it said it was “brilliant” to meet the monarch.
Members of the Lord Street in Bloom gardening group, who have been looking after the flowers outside the town hall, were also there to meet the King as was siblings Antony and Jenna Johnson, who distributed free ice creams from their family business Triviso to children in Southport in the days after the attack.
The King is also due to meet with the three bereaved families in London on Wednesday.