BEDFORD, N.H.—Ben Carson, a retired pediatric neurosurgeon and Republican presidential candidate, called the concept of sanctuary cities for illegal immigrants “ridiculous” during a campaign stop today at the Bedford Village Inn.

Carson was referring to a recent murder in San Francisco, where an alleged killer was released from custody despite having been deported from the U.S. five times due to criminal acts.

San Francisco officials have said they did not turn over the illegal immigrant to federal authorities because of the city’s status as a “sanctuary city” for people in the country illegally.

Carson said that presidential candidates should be discussing how to address illegal immigration, rather than using “the words Donald Trump used” to describe the problem, which were “perhaps a little inflammatory.”

“I learned several months ago to tone my rhetoric down so that people could actually hear what I was saying,” Carson said.

In order to contain illegal immigration, Carson said, “you’ve got to seal the border.”

Carson suggested using a “host” of options to monitor the border including technology such as drones.

“I’m not just talking about fences and walls, that’s old school,” Carson said.

Carson said that sealing the border is only the first step towards preventing illegal immigration.

“That’s part one,” Carson said. “Part two is, you have to turn off the spigot that dispenses the goodies.”

Carson said that those who seek to build a better life in America should know that they can only do so through hard work.

He suggested reforming the guest worker program, and allowing those seeking work to come into the country provided that they are registered and paying taxes.

Carson also rejected the notion that he is not qualified to speak on foreign policy because he hasn’t held a political office.

“A lot of people say, ‘but you’re a neurosurgeon, you couldn’t possibly know anything about foreign policy,’” Carson said. “What imbeciles … If you have a brain, and you have the ability to talk to people, and you have the ability to listen, and you have the ability to read, you can learn stuff. Believe me.”