Facebook turned on its "Safety Check" feature for the first time in the U.S. in the wake of the Orlando shooting in which 50 people were killed in a nightclub by a gunman.

The feature allows people to use the social networking site or app to notify people that they are safe in the wake of a crisis or disaster. Users can check to see if friends are safe. When a person selects the option to say "I'm safe," friends will be notified.

Friends and family members embrace outside the Orlando Police Headquarters during the investigation of the shootings at the Pulse nightclub in Orlando on June 12, 2016. Steve Nesius / Reuters

"Waking up this morning, I was deeply saddened to hear about the shooting in Orlando. My thoughts and prayers are with the victims, their families and the LGBT community," Facebook Chief Executive Mark Zuckerberg said in a post on his official page on Sunday.

The move comes after a gunman stormed a gay nightclub in Orlando, Florida, killing 50 people and wounding more than 50 others. Authorities identified the shooter as Omar Mateen, aged 29. He was engaged in a shootout with law enforcement and was killed after a three-hour siege.

It's the first time that the safety check feature has been activated in the U.S. since it was launched in October 2014. Safety Check has been turned on for other incidents such as the series of terrorist attacks in Paris in November and Typhoon Ruby in the Philippines in 2014.

Read More From CNBC: Facebook Expands Safety Check After Paris Attacks

Facebook has been criticized for not turning on the feature more frequently in the wake of attacks like in Paris. Around the same time as November's Paris attacks, a pair of suicide bombings had taken place in Beirut, but Safety Check was not activated in that area. Shortly after, Facebook vowed to activate Safety Check more often for such events.