Jerusalem Mayor Nir Barkat said Tuesday that his city employs a variety of techniques to try to stop terrorist attacks before they happen, including the use of "smart" profiling and armed citizens.

In Israel, most of the Jewish citizens are members of or have served in the military.

"When we have a terror threat, we ask people to carry their guns," Barkat told CNBC's "Squawk Box" during a trip to New York City. "Usually we're talking about officers, captain and up, from the Israeli army, which are well-trained [and] very responsible. They know how to go to combat."

"They're sometimes better trained than the police," he said. "There's no misuse of rifles and guns in Israel. On the contrary, they give extra measures [and] extra security. It's exactly the opposite, I believe, [of] what is happening in the United States."

About 3 percent of Israeli civilians are licensed to carry weapons, said Barkat. By comparison, about 5 percent of adults in the U.S. have concealed carry permits, according to the Crime Prevention Research Center.

Read MoreBill Daley: Trump's Muslim ban proposal harms the US



The recent terrorist attacks in Paris and San Bernardino, California, have sparked debate about gun control in the United States and around the world, with conflicting views on whether more guns or fewer guns would help prevent deadly violence.

Following the Nov. 13 rampage in Paris, Barkat issued a statement that read in part: "Today the entire world understands what we have been experiencing in Israel and Jerusalem in recent decades — murderous terror fueled by hate and a death mission against innocent civilians in the West. We must unite together against all forms of terror. From Jerusalem, we send our deepest condolences."

Barkat also said on CNBC Tuesday that "smart" profiling helps to keep the citizens of Jerusalem safer by treating radicals and suspected terrorists of all religions the same. "You have to differentiate between the 'good guys' and the 'bad guys.'" He said judgments about saving lives and quality of life have to be weighed. "We will always prefer to save lives," Barkat added, even if there are some short-term measures that restrict freedom.

Read MoreTony Blair: Destroy ISIS by all means necessary

"You must differentiate between those folks and a small percentage of radical Islamic people that are inciting the teenagers," he said. "There is also some profiling of the radical Jewish population."

A third of the residents in Jerusalem are Muslims, Barkat said. "The majority of the Muslim population is concerned about these terror attacks as much as anybody else. They're the first to suffer. And nobody goes and buys in the neighborhoods. They have challenges getting to work. So all the population of Jerusalem suffers in [the] case of terror attack."

If an attack occurs, after any immediate threat is neutralized, Barkat said that one of the most important stands against the perpetrators is resilience. "Go back to life as fast as possible. Don't cancel events. Don't stop public transport. None of that. You go on with life as fast as possible so that the terrorists will get zero gains."

"People want to live together in our city. We will not let radical Islam or other radicals deter our way of life," he said.