Orlando: A gunman opened fire inside a crowded gay nightclub in Orlando, killing 50 people and injuring dozens more.

Authorities called the attack at Pulse, a popular gay bar and dance club in the wee hours of June 12, as an act of domestic terrorism.

Officials said the shooter was shot and killed by police officers in a shootout.

The suspected gunman was identified as Omar Mateen, a 29-year-old from Fort Pierce, Florida. One relative said that Mateen’s family was in shock after being told on Sunday morning about his involvement.

Mateen’s family is from Afghanistan, while Mateen is believed to have been born in the United States.

“It appears he was organized and well-prepared,” Orlando Police Chief John Mina said at a Sunday-morning news conference, noting that the shooter had an “assault-type” weapon and a handgun.

At least 42 people were transported to various hospitals, Mina said, adding that one officer was wounded.

“This is an incident … that we certainly classify as a domestic terror incident,” Orange County Sheriff Jerry Demings said at the news conference.

Orlando Mayor Buddy Dyer urged people to be stand strong. “We need to be supportive of the victims and their families.”

The White House said President Barack Obama was briefed on the incident Sunday. “Our thoughts and prayers are with the families and loved ones of the victims,” the White House said in a statement.

The horrific incident began as Saturday gave way to Sunday at the crowded club. Around 2 a.m., Pulse Orlando posted an urgent message on Facebook: “Everyone get out of Pulse and keep running.”

Within minutes of the shooting, police vehicles and a SWAT team descended on the club, which had more than 300 people inside as the shooting began.

About three hours after the initial reports of gunfire, the SWAT team launched a rescue operation and killed the gunman, authorities said.

“The decision was made to rescue hostages that were in there,” Mina said.

Police later reported that a sound heard at the club was a “controlled explosion.”

The early-Sunday rampage followed the fatal shooting Friday night of a pop singer who was killed while signing autographs following a performance at an Orlando concert venue. Christina Grimmie, a 22-year-old singer who was a finalist on NBC’s show “The Voice,” died hours after being shot by a gunman who then shot himself, police said.