President Trump declared Monday that attacks on law enforcement “are a stain on the very fabric of our society” and “must end right now,” during the National Peace Officers' Memorial Service.

The president made respect for law enforcement a theme of his remarks outside the U.S. Capitol.

He urged Americans to thank police officers on the beat and vowed to make it a “personal priority” to ensure police are treated “with honor and respect.”

"The attacks on our police are a stain on the very fabric of our society,” he said, calling law enforcement the “thin blue line between civilization and chaos.”

He added, “The attacks on our police must end, and they must end right now.”

Trump said more officers were killed in ambushes last year than at any time in more than two decades.

Speaking earlier in the Oval Office, Trump said police officers have "had it with what's going on" and said 118 law enforcement officers died in the line of duty in 2016.

Trump signed a proclamation to mark Peace Officers' Memorial Week and Police Week, and is asking the Justice Department to develop strategies to prevent and prosecute violent crimes against law enforcement.

The Associated Press contributed to this report.