FACEBOOK says it “regrets” an algorithm blunder that caused balloons and confetti to appear over posts about the deadly earthquake in Indonesia this month.

Following the killer quake on the island of Lombok on Sunday — which has so far claimed at least 142 lives and injured more than 200 — users took to the social network to share their messages of condolence and support.

But many were shocked to find certain comments had triggered Facebook’s celebratory animation feature to flood their screens, raining the messages of support with balloons and confetti.

It seems the blunder was sparked by posts that contained the word “selamat” — which can mean “safe” or “uninjured”, but can also mean “congratulations”, depending on the context.

Clearly misinterpreted by the platform’s interpreting algorithm to mean the latter, the comments prompted the festive animations whenever it was shared.

“This feature (a text animation triggered by typing ‘congrats’) is widely available on Facebook globally, however we regret that it appeared in this unfortunate context and have since turned off the feature locally,” Lisa Stratton, a Facebook spokesman, told Motherboard in an email. “Our hearts go out to the people affected by the earthquake.”

Herman Saksono, an Indonesian computer science PhD student, spotted the blunder over the weekend.

“‘Congrats’ in Indonesian is ‘selamat’. Selamat also means ‘to survive’,” he tweeted. “After the 6.9 magnitude earthquake in Lombok, Facebook users wrote ‘I hope people will survive.’ Then Facebook highlighted the word ‘selamat’ and throw some balloons and confetti.”

More than 10,000 people were evacuated in the aftermath of the quake, including 4600 foreign and domestic tourists across the three Gili islands off Lombok.

The 7.0 magnitude quake struck at 7.45pm local time on Sunday, August 5.

Rescuers have located victims beneath flattened buildings, with one woman pulled alive from the rubble of a collapsed mosque, which fell as people were praying.

Oxfam said it was providing clean drinking water and tarpaulin shelters to 5000 survivors, but more than 20,000 estimated have been displaced.

A tsunami warning was issued in the aftermath covering the surrounding regions, but has since been lifted.

It comes just a week after Lombok was rocked by another earthquake that killed 17 people.

The National Disaster Mitigation Agency (BNPB) said the death toll was expected to rise after reports of thousands of buildings collapsing, especially in the north, the quake’s epicentre.