Beachgoers are welcome to visit Ocean City this Memorial Day weekend, but officials there have a request: Please leave your knives and laser pointers at home.

The City Council and mayor this week unanimously approved emergency ordinances that ban the sale and possession of laser pointers and a certain kind of knife that police officials say opens quickly and is dangerous.

The knives, known as “assisted-opening” knives, look similar to switchblade knives, which are already prohibited by Maryland law, but police in the beach town said these are slightly different. The assisted-opening knife, they say, can be opened “both quickly and discreetly with just the flick of a thumb.”

And the “presence of this type of knife jeopardizes the safety of our citizens,” the city’s police department said.

The city ordinances went into effect immediately, days before the kickoff of the summer season with the Memorial Day holiday, when the town expects some 200,000 visitors.

“They’re a public safety issue and a quality of life issue,” said Brent Ashley, a member of the City Council. “We try to promote that we’re a family-friendly town here, and we’ve noticed more and more places on the Boardwalk are selling these knives, and that certainly doesn’t lend itself to a family atmosphere.”

“It is something we want to nip in the bud,” he said of the recent ban on the speciality knives. “We don’t want them on our Boardwalk or in our town.”

The latest ban on assisted-opening knives comes as Ocean City police said they’ve seen an uptick in weapons violations in the last few years, particularly with knives. The number of incidents involving knives hit 181 last year, up from 141 in 2012.

Police officials showed a video at a Monday night council meeting that laid out the various types of knives they’re concerned about. The new ordinance on assisted-opening knives adds it to the city’s list of various weapons that are already banned, including nunchakus, throwing stars, metal knuckles and fighting axes.

Ross C. Buzzuro, Ocean City’s police chief, said his department recommended prohibiting the assisted-opening knives because they’re “very easy to open and become a weapon.”

“In the interest of public safety, there’s not a real good reason to have a knife of that type in this environment,” said Buzzuro, who served 27 years in the Baltimore City Police Department before taking over Ocean City’s police force. The department has 105 full-time officers and adds another 100 in the summer. He said that while he believes his town and Boardwalk are “very safe,” the latest ban on assisted-opening knives is a “proactive measure.”

But some say the ban on the knives may be an overreaction. David Martella, a criminal defense attorney and former prosecutor in Montgomery County, said based on his reading and analysis of state laws, prosecutors could convict someone of carrying a concealed assisted-opening knife under the existing switchblade statute. And more generally, he said, the city seems to be too focused on various types of knives.

“I suspect some lawmakers just couldn’t get past Tony killing Bernardo with a switch-blade in ‘West Side Story,’ ” he said. “Kitchen knives, folding knives and box cutters are just as dangerous. It all depends on how the knife is used.”

Knives aren’t the only thing Ocean City is banning.

City leaders also passed an emergency ordinance this week that bans the sale and possession of laser pointers.

Ocean City Police said it received 1,000 complaints in the last three years of laser pointers being shined into the faces of passersby or police officers or in the eyes of drivers of its tram that travels on the Boardwalk and even at aircraft and helicopters. Police call it a “nuisance crime.”

The ordinance banning laser pointers came about, city officials said, because previous attempts at getting store owners to distribute information warning buyers of laser pointers to not shine them at people or aircraft failed. After hearing how police were spending time and resources responding to so many complaints of the pointers, city officials said they decided to put in strict penalties.

“The resources of our police department are much better spent on other things,” said Ocean City Mayor Richard W. Meehan. “The easiest and quickest solution is to ban the laser pointers.”

Anyone caught with a knife or laser pointer could face a fine of up to $1,000. Those caught with the speciality knife could also face up to six months in jail, and those in violation of having a laser pointer could face up to 90 days in jail.

“Police were concerned about” knives and laser pointers, Meehan said. “They wanted to handle the situation immediately. This is going to be a big weekend. The season is picking up. The safety of our residents and visitors is our priority.”

Ocean City officials also put in place several other measures that they say will help keep residents and visitors safe and promote their family-friendly atmosphere.

They’re installing nine additional security cameras along the Boardwalk. And this weekend will be a test of a new ordinance that they passed late last year banning people from riding in the back of pickup trucks.

Officials said they’re installing “no profanity” signs along the popular Boardwalk to try to encourage people to not use foul language in public. The signs read — “No Profanity Please. Be Courteous.”

“Not everybody is being as courteous as they can be,” Meehan said. “There may be children around, and profanity is just not the type of language you need to have in public.”

Officials also recently passed rules raising the fine for those who feel the need to relieve themselves in public. The penalty for public urination went up to $100 from $25.

“We don’t have to water the bushes” in the summer, said Ashley, the City Council member who lives in a condo on Ninth Street in Ocean City. Last year, Ashley became well-known for trying to propose a ban on saggy pants that fall below a person’s waist, but the proposal never went anywhere.

“We have public restrooms on the Boardwalk, but, for some reason, people walking down the street decide they have to go and they just go,” he said. “We’re not going to have people just urinating all over town.”