Incidents like the terrorist attack on a Christmas market in Berlin show that Singapore cannot be complacent, said Speaker of Parliament Halimah Yacob yesterday.
Building strong community ties is important to guard against such tragedies, she added.
"Before we ever reach such a situation, if we do, we must be sure that we build a very strong foundation," she said.
Twelve people were killed in Monday's attack - for which the Islamic State in Iraq and Syria terror group claimed responsibility - when a truck was driven into a Christmas market.
"It is really, really sad, and it is really not reflective of what Islam is all about," said Madam Halimah.
She was replying to a question from the media at Toys Carnival @ Marsiling, a Christmas celebration for needy children from Marsiling-Yew Tee GRC, where she is a grassroots adviser.
It was the second time this year that a truck was used as a terrorist weapon targeting large crowds.
On July 14, 86 people were killed after they were run over by a truck in Nice on Bastille Day, the French national holiday.
Madam Halimah said events such as Toys Carnival @ Marsiling, in which families of all races take part, are key to fostering ties. "These are the platforms that we must consciously create to develop strong community bonding... It is not possible to legislate harmony, but we can build harmony."
Now in its second year, the annual event brought festive cheer to around 150 children on the morning of Christmas Eve.
There were magic performances, face painting, games and a photo booth where families could take photographs together with a friendly "snowman" and Santa Claus.
The children could also choose gifts from a selection including board games, toy cars and educational science kits, sponsored by investment firm ESW Manage.
On the free toys, Madam Halimah said parents under financial pressure will rightly prioritise expenses such as their children's education, uniforms and books.
"But at the same time, the children, I'm sure, would like to have new toys," she added.
Eight-year-old Nur Sahilah Md Husni chose a My First Chemistry Set, saying: "I want to learn science."
She will start studying science next year when she begins Primary 3.
Twins Nur Nabila Hussain and Nur Nadhira Hussain, eight, chose a toy baking set and an ice-cream maker, respectively.
Nur Nabila, who can already cook eggs on her own, said: "I want to help my sister to make ice cream too."