Speaking in a video released early Friday evening, Trump said the shootings of the 12 officers, five of whom were killed, had "shaken the soul of our nation."
"A brutal attack on our police force is an attack on our country, and an attack on our families. We must stand in solidarity with law enforcement, which we must remember is the force between civilization and total chaos," Trump said. "Every American has the right to live in safety and peace."
He added that the deaths of Alton Sterling in Louisiana and Philando Castile in Minnesota show "how much work we have to do in order to make every American feel that their safety is protected." The video statement marked the first time that Trump had publicly named the victims in the shootings.
Trump also said that racial divisions in the country have "gotten worse, not better" and called for "prayers, love, unity and leadership."
Earlier Friday, Trump issued a statement on the shootings in which he said the U.S. "must restore law and order. We must restore the confidence of our people to be safe and secure in their homes and on the street."
He also cited "senseless, tragic deaths of two motorists in Louisiana and Minnesota," a reference to Sterling and Castile, though he did not mention their names.
The presumptive presidential nominees for both major political parties have postponed campaign events Friday, following the deadliest single day for U.S. law enforcement since September 11, 2001.
Trump canceled campaign stops in Miami and Hillary Clinton postponed her scheduled rally with Vice President Joe Biden in Scranton, Pennsylvania, as well as a fundraising event. Clinton is still expected to speak Friday afternoon in Philadelphia, where she is expected to address this week's shootings in Dallas, Baton Rouge and Minnesota.
Clinton's speech was scheduled before the shootings.
"I mourn for the officers shot while doing their sacred duty to protect peaceful protesters, for their families & all who serve with them. -H" Clinton tweeted Friday.
Politicians from Texas and around the country offered condolences and reactions to the fatalities, with Trump decrying "the horrors we are all watching take place in our country."
Texas politicians pray for law enforcement
Texas Sen. Ted Cruz sent a series of tweets on Thursday night, writing that "my prayers are with those harmed in Dallas and with the first responders; we will be in touch w/ local authorities to assist however we can."
Cruz also praised police officers' courageous response to the attacks.
"Men & women of law enforcement selflessly run into harm's way to save the lives of others. May God protect them and bring peace upon Dallas," the former Republican presidential hopeful wrote. "May god protect our fallen heroes and bring peace upon the city of Dallas."
Sen. John Cornyn, Cruz's senior colleague from Texas, put out a statement Friday morning, saying, "To target those who serve and protect our community in such a senseless and vicious way is shocking and reprehensible."
"My condolences are with the families of the officers who lost their lives in last night's horrific attack, and my thoughts continue to be with the injured and those in the Dallas area affected by this unspeakable tragedy," he said.
Texas Gov. Greg Abbott put out a statement just after midnight on Friday, saying, "Our thoughts and prayers are with the Dallas law enforcement community and the Dallas Area Rapid Transit (DART) officers killed and injured this evening. I've spoken to Texas Department of Public Safety Director Steve McCraw and have directed him to offer whatever assistance the City of Dallas needs at this time. In times like this we must remember -- and emphasize -- the importance of uniting as Americans."
Some members of Texas's congressional delegation also used social media to offer their support.
GOP Rep. Pete Sessions wrote on Twitter late Thursday that "as this situation continues to unfold, I'm praying for the brave men and women of the @DallasPD and those in downtown Dallas."
Democratic Rep. Joaquin Castro wrote that "my thoughts and prayers are with the law enforcement officers in Dallas who have been shot and injured tonight."
Gun control advocates sound off
Several Democrats who have been leading voices in the push for gun control legislation also reacted to the news out of Dallas, including Connecticut Sen. Chris Murphy and former Arizona Rep. Gabrielle Giffords, herself a victim of gun violence.
Giffords wrote on Twitter that she was "heartbroken by murder of law enforcement officers in #DallasShooting. We have to do better than this. This is not the America we strive for."
And Murphy -- who launched a Senate filibuster in response to the terror attack in Orlando in an attempt to spur action on gun control legislation -- expressed frustration, placing the Dallas attacks in the larger context of gun violence.
"I DON'T ACCEPT police gunned down by snipers, kids murdered in school, or black men shot during routine stops. I believe we can stop it all," he wrote on Twitter.
Massachusetts Sen. Elizabeth Warren, a favorite among progressives and a potential running mate for Clinton, expressed sorrow for both the civilians and police officers slain this week in a series of tweets.
"Black Americans shouldn't be killed in routine traffic stops, & police shouldn't be killed while protecting & serving their communities," Warren tweeted.
"I wish I had the answers right now to stop the very real pain that people are feeling, but I know this: change must come. It must come now," Warren added