A photo of a Saudi security man carrying a child so that his father could pray in Medina's Masjid An-Nabbawi (Prophet's Mosque) broke Saudi internet earlier this week.

Speaking to Al Arabiya EnglishJuman Al Assiri, head of public relations, information, and communication at the mosque, said "the scene reflects the constant dedication of security men serving worshippers at the site."

Even though the heartwarming gesture won the hearts of hundreds on social media, it also sparked a heated debate on Twitter.

Some people felt a security man's job isn't to take care of people's children - except in cases of emergency.

Here's how the discussion over the matter played out online:

The security man's photo was all over Twitter

Some felt it wasn't the policeman's duty to carry the child

"We thank him for his kindness but it isn't his job to carry an infant, he has more important things to do. Just an opinion." 

Others harshly criticized the kind gesture

"Things have crossed limits, this is a security man who should hold himself up to specific standards. A child is his parents' responsibility. It's only excusable for policemen to help out when it's an urgent case." 

Some were worried over this

"If an accident that requires his immediate attention took place, would he put the child down or wait?"

Not everyone thought the gesture was out of place though

"Where's the problem here?"

Some thought it was cute

"If I were in their place, I'd only trust a security man with my child"

Many were proud of this officer's kindness

"These men are the pride of our nation." 

Not the first time a Saudi security officer goes viral for a kind gesture

Earlier this year, a video capturing a Saudi security man carrying an elderly pilgrim through the crowds in Mecca's holy mosque during hajj season also went viral online.

At the time, the footage moved thousands who hailed the man for his kind gesture.