A photo of the front page of Tuesday's New York Times sparked immediate criticism on Monday night – including from several 2020 Democratic presidential candidates.

The headline read "Trump urges unity vs. racism." It comes after President Donald Trump addressed the nation after mass shootings in Dayton, Ohio, and El Paso, Texas, that killed nine and 22 people, respectively.

The headline ran in the Times' first print edition and was changed in subsequent editions, The Times told USA TODAY in a statement Tuesday.

The original headline didn't sit well with a number of Democrats.

"Let this front page serve as a reminder of how white supremacy is aided by – and often relies upon – the cowardice of mainstream institutions," tweeted Rep. Alexandra Ocasio-Cortez of New York.

Defamation suit:Sarah Palin's lawsuit against New York Times back from the dead

Start the day smarter:Get USA TODAY's Daily Briefing in your inbox

New Jersey Sen. Cory Booker, who told CNN over the weekend that Trump was "responsible for this," said via Twitter: "Lives literally depend on you doing better, NYT. "Please do."

Fellow Democratic presidential candidates Kirsten Gillibrand and Beto O'Rourke – who called the headline "unbelievable" – also sounded off on Twitter.

Even a New York Times contributor was taken aback by the headline. Op-ed contributing writer Wajahat Ali tweeted: "I write for the NYT. This is a terrible headline."

Trump has repeatedly faced criticism for his stance on immigration. He also recently tweeted four Democratic congresswomen should "go back" to the "crime infested places from which they came."

Trump's tweets were condemned as racist by the U.S. House of Representatives.

The Times' headline was changed for the newspaper's next edition, reading "Assailing hate but not guns."

Ali tweeted appreciation: "This one is on point! Thank you!"

"The original headline was flawed and was changed for all editions of the paper following the first edition," Danielle Rhoades Ha, vice president of Communications for The Times, said in an emailed statement Tuesday. "The headline in question never appeared online, only in the first print edition."

As a result of the controversy, the hashtag #CancelNYT began trending on Twitter Tuesday afternoon as social media users expressed outrage about the headline. Many demanded the resignation of Times editors while pledging to unsubscribe from the paper and calling for others to do the same.

Some have criticized the hashtag, arguing The Times buckled too easily by changing the headline under liberal pressure.

Both front pages were shared by New York Times associate masthead editor Tom Jolly on Twitter.