A popular children's song became a rallying cry in Lebanon after protesters in Beirut spontaneously sang the hit to calm a toddler caught in the midst of a noisy demonstration.

When driver Eliane Jabbour was surrounded by a rally in the capital last weekend, she asked protesters if they could stop shouting as her young son, Robin, was asleep in the front passenger seat.

On the spot, Ms Jabbour said, the crowd spontaneously broke out into a rendition of the song "Baby Shark", complete with hand gestures depicting a shark's bite, and big smiles.

The video shot by Ms Jabbour, which has since gone viral, shows a group of around 20 people around her car, singing to the surprised toddler as he clutches a bottle.

A bearded man is seen dancing, wading in and out of the crowd with fish-like motions.

The "Baby Shark" song has been popularised by a video uploaded to YouTube by a South Korean children's educational company called Pinkfong in 2016.

It has become one of the most-watched videos on the platform, with over 3.7 billion views.

Protesters in Lebanon are angry about the state of the economy, corruption and public services, but the 'Baby Shark' episode brought a moment of relief from the wave of dissent, and a uniting rallying cry.

Videos posted on Twitter on Sunday showed demonstrators waving Lebanese national flags, letting off flares and singing the catchy song.

Even Robin, who appeared wide-eyed and unmoved by the all-singing, all-dancing crowd in the video posted by his mother, has become a fan.

"Although he looked confused in the video, right now he starts laughing whenever he watches it," she told Reuters on Tuesday.

Some of President Michael D Higgins' engagement in Lebanon last week were cancelled because of the violence.