Donald Trump. AP Photo/Jim Cole Donald Trump attempted to closely tie himself to the LGBT community during a Monday speech that followed the terrorist attack on a gay nightclub in Orlando, Florida, early Sunday morning.

The massacre left at least 49 people dead. The gunman, Omar Mateen, 29, was born in the US to Afghan parents, and, according to his father, was recently disturbed by seeing two men kissing in Miami.

The shooting is being investigated as an act of terror, as Mateen allegedly pledged allegiance to ISIS and other terror organizations ahead of the attack.

"Our nation stands together in solidarity with the members of Orlando's LGBT community," Trump said, according to prepared remarks distributed by his campaign. "This is a very dark moment in America’s history. A radical Islamic terrorist targeted the nightclub not only because he wanted to kill Americans, but in order to execute gay and lesbian citizens because of their sexual orientation."

"It is a strike at the heart and soul of who we are as a nation," he said. "It is an assault on the ability of free people to live their lives, love who they want, and express their identity."

At two points in the speech, Trump seemed to confuse the LGBT acronym, at one point referring to the community as "LBGT." But he was forceful in his condemnation of the ideology perpetrated by terror groups, which he cast as "anti-gay and anti-American."

"I refuse to allow America to become a place where gay people, Christian people, and Jewish people are the targets of persecution and intimidation by radical Islamic preachers of hate and violence," he said, adding that it's a "quality-of-life issue."

"If we want to protect the quality of life for all Americans – women and children, gay and straight, Jews and Christians, and all people – then we need to tell the truth about radical Islam," he said.

In the speech, Trump used recent terror attacks, including the one in Orlando, to prop up one of his most prominent campaign policy proposals: an indefinite ban on Muslim immigration into the US.

He ripped presumptive Democratic nominee Hillary Clinton for supposedly weak immigration policies that he said prove she cannot claim to be a friend to LGBT Americans.

Clinton has advocated for proposals that would allow 65,000 refugees from war-torn Middle Eastern countries such as Syria to enter the US following a lengthy screening process.

"Hillary Clinton can never claim to be a friend of the gay community as long as she continues to support immigration policies that bring Islamic extremists to our country who suppress women, gays, and anyone who doesn’t share their views," Trump said, according to prepared remarks. "She can’t have it both ways. She can’t claim to be supportive of these communities while trying to increase the number of people coming in who want to oppress them."

He added: "Why does Hillary Clinton want to bring people here — in vast numbers — who reject our values? Ask yourself, who is really the friend of women and the LGBT community: Donald Trump with his actions, or Hillary Clinton with her words? Clinton wants to allow radical Islamic terrorists to pour into our country — they enslave women and murder gays. I don’t want them in our country."

Many observers noticed the theme in his speech. Annie Linskey, a reporter for The Boston Globe, tweeted that Trump was the "most pro-gay GOP presidential nominee we've had."