London Mayor Sadiq Khan announced a crackdown on knives Sunday in response to the rising levels of violence in London, which recently surpassed New York City's homicide rate for the first time.

"No excuses: there is never a reason to carry a knife," Khan tweeted. "Anyone who does will be caught, and they will feel the full force of the law."

There have been more than 50 homicides in London so far in 2018, and much of the violence is tied to gangs.

Guns are strictly regulated in the United Kingdom and the rising homicide rate in London is directly attributable to a rise in knife-related crimes, with stabbings claiming at least 31 lives to date in 2018. By contrast, New York — which has a population roughly the same size as London — has seen a steady decline in violent crime.

There were 15 murders committed in London in February and another 22 in March, while New York saw 14 murders in February and 21 in March, according to murder rate statistics provided to USA TODAY by London's Metropolitan Police and the New York Police Department.

In Britain, it is currently illegal to carry a knife longer than three inches in public "without good reason" and illegally carrying a knife can be punished with up to four years in prison and an "unlimited fine."

Self-defense is not listed among the examples of "good reasons to carry a knife." The courts determine if someone's reason to carry a knife is valid. Condoned examples of knife-carrying include if it is necessary for a person's work or if it is being brought to a gallery for exhibition.

Khan's tweet included a link to his plan to tackle the city's rising crime rates, including the creation of a 120-member violent crime task force and "targeted patrols" with expanded stop and search authority for "areas worst-affected by knife crime."

In February, the mayor launched a $63 million program to help keep young Londoners from "getting caught up in crime" and the Mayor's office has launched a "London Needs You Alive: Don't Carry a Knife" awareness campaign targeted at the city's teens.

Contributing: Kim Hjelmgaard in London

More:London's murder rate now tops New York City's

More:London mayor defends feud with Trump