Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

White House press secretary Sean Spicer on Monday defended President Trump’s immigration order by arguing the responsibility of keeping the country safe far outweighs the inconvenience some faced when being detained upon entering the U.S. after the surprise order.

“It’s ashame that people were inconvenienced, obviously, but at the end of the day we’re talking about a couple hours,” Spicer said at the White House daily briefing. “I’m sorry that some folks may have had to wait a little while, but I think the president would much rather know that he’s not placing a call to someone who was killed because someone was let into this country to commit a terrorist act.”

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Without warning late Friday, Trump issued a temporary ban on visitors from seven predominantly Muslim countries that left even those with valid green cards or visas temporarily detained. Others were denied boarding on plans bound for the United States.

The Department of Homeland Security later declared legal residents exempt from the order, and a judge blocked part of the order.

About 109 travelers were detained following the order, though the White House said Sunday all had been released from U.S. airports. Spicer said it was a small price to pay for safety considering 325,000 international air travelers arrive in the United States each day.

The move prompted protests at airports around the country from those who viewed the order as a “Muslim ban.” Trump defended his action in a statement, saying the order is not about religion but “about terror and keeping our country safe.”

Former President Barack Obama released a statement during the briefing saying he was “heartened by the level of engagement taking place in communities around the country.”

Obama also said, through a spokesman, he rejects the comparisons the Trump administration has made to his foreign policy decisions. The Trump administration has pointed to Obama-era policies in helping to define the seven countries to institute the temporary ban.

“The president fundamentally disagrees with the notion of discriminating against individuals because of their faith or religion,” a spokesman for Obama said.