Washington (CNN) President Donald Trump on Monday suggested tying immigration legislation to strengthening background checks following a weekend in which the alleged shooter in El Paso, Texas, is believed to have authored a racist, anti-immigrant document targeting Hispanics.

Trump has previously expressed an openness to tougher action on gun control only to back away under pressure from Second Amendment activists and the gun lobby. He did not indicate in his tweets on Monday morning if he supported a sweeping gun control bill that passed the House with bipartisan support in February that requires universal background checks but has not been considered by the Senate.

"Republicans and Democrats must come together and get strong background checks, perhaps marrying this legislation with desperately needed immigration reform," Trump wrote in a pair of tweets, adding, "We must have something good, if not GREAT, come out of these two tragic events!"

Trump also sought to blame the media for the weekend's rampages, saying coverage has "contributed greatly to the anger and rage that has built up over many years," even though the President's rhetoric -- including calling illegal immigration an "infestation" -- has been scrutinized in the wake of the shooting and its potential connection to increased violence against immigrants.

In a televised address later Monday morning, Trump called on the nation to "condemn racism, bigotry and white supremacy" but stopped short of acknowledging his own divisive and racist rhetoric. He did not mention background check legislation or tie any gun action to immigration. He did back so-called "red flag" laws that would prevent access to people who are mentally ill, and he cited video games as a cultural driver behind mass shootings.

Racial motivation seen in El Paso attack

In the El Paso shooting, where at least 20 people were killed, the alleged shooter -- identified as Patrick Crusius, of Allen, Texas -- is believed to have authored a four-page document online shortly before the shooting, filled with white supremacist language and racist hatred aimed at immigrants and Latinos and blames immigrants and first-generation Americans for taking away jobs.

The writer cited a fear that an influential Hispanic population in Texas would make the state a "Democratic stronghold." But he says "the Republican Party is also terrible" because the GOP is in his mind pro-corporation, which could lead to more immigration.

The author says he's held these beliefs for years, before Trump became President.

Shortly after the El Paso massacre, a shooter in Dayton, Ohio, opened fire in the city's Oregon District, a popular downtown area, leaving nine dead. The shooter, a 24-year-old male, was shot and killed by responding officers. Police have not released a possible motive behind the attack, and two federal law enforcement sources have told CNN that a preliminary assessment of the shooter's writings did not indicate any racial or political motive.

Trump has long seized on racial tensions for his political gain. Prior to running for president, he pushed "birtherism" -- falsely questioning the birth place of Barack Obama, the nation's first African-American president -- opened his 2016 candidacy by referring to Mexican immigrants as "rapists" and called for banning all Muslims from entering the United States. He was widely criticized for blaming "both sides" in the 2017 Charlottesville, Virginia, white supremacist rally in which one protester was killed and used racist language last month in telling four progressive minority lawmakers to "go back" to the countries of their ancestry, even though all four are US citizens.

In his first public comments following the shootings, Trump acknowledged that "perhaps more has to be done" to address gun violence. His administration has overseen a ban on so-called bump stocks, but has not pursued large-scale gun control efforts. His predecessor, Obama, took executive actions on gun control, including on background checks and mental health.

2020 Democrats express outrage

Democratic presidential hopefuls quickly accused Trump of fostering the environment that led to the El Paso shooting and of disingenuously pushing for gun safety.

Asked on Sunday if there was anything that Trump could do to protect against gun violence, Beto O'Rourke, a former congressman who represented El Paso, snapped back, "What do you think?"

"You know the s--- he's been saying. He's been calling Mexican immigrants rapists and criminals. I don't know, like, members of the press, what the f---? Hold on a second. You know, I -- it's these questions that you know the answers to," O'Rourke replied.

"That's a joke," Rep. Tim Ryan of Ohio said on CNN's "New Day," Monday, referring to Trump's suggestion that gun control and immigration legislation be tied together. "That's an absolute freaking joke that he's going to tie this to the most polarizing issue happening in the United States around immigration reform. This is very clear-cut here. There are people that are getting access to guns that shouldn't be, and the guns are high-powered. The magazines hold too many bullets, and they are coming to places like Dayton and El Paso, Walmarts, entertainment districts, churches like Mother Emanuel AME in South Carolina and they are killing American citizens."

Ryan added: "Mitch McConnell needs to get off his ass and do something. People are getting killed in the streets in America and nobody is acting. Nobody."

Sen. Kirsten Gillibrand, a New York Democrat who is also seeking her party's 2020 presidential nomination, said Monday that it's "absurd" for Trump to link immigration and gun violence together.

"He's linking the issue of basic, common-sense gun reform, that we should be going back into the Senate today to vote on, with this issue of immigration because again he continues to try to demonize people seeking asylum, people needing our help," Gillibrand told CNN's John Berman on "New Day."

The President has so far not commented on accusations from Democrats that his language on immigration contributed to the El Paso shooting. Trump's acting chief of staff, Mick Mulvaney, dismissed such connections Sunday, saying on NBC, "People are going to hear what they want to hear."