British and Canadian tourists were warned to stay inside their Montego Bay resorts in Jamaica after a spate of violence led officials there to deploy soldiers and declare a state of emergency.

The British government on Thursday advised its citizens visiting the tropical island that they should “limit movements” outside of resorts and exercise caution if traveling at night.

Police have said they will take a zero tolerance approach to crime in the parish of St. James, where Montego Bay is located, and nearby communities that have seen an increase in killings that officials blame on gangs and lottery scams.

On Jan. 19 Canada advised citizens visiting Jamaica to “exercise a high degree of caution” while traveling in the country.

Jamaican Prime Minister Andrew Holness said in a statement that extra steps were needed to “bring the parish of St. James under control and restore public safety.”

BRITISH AIRWAYS PILOT REMOVED FROM PLANE AMID FEARS HE WAS DRUNK

“Travel to and from the airport or for excursions should be undertaken with organized tour operators, and transport should be arranged or provided by the resort hotels,” the U.K. Foreign Office advisory states.

One tourist staying in Montego Bay with his wife told Sky News about the increased police and military presence.

He said: "We have seen an increased military presence going in and out of the resort, vehicle checkpoints and inside the resort we have seen police boats which have come up to the resort,” said Daniel Blakey.

There were 335 murders recorded in 2017 in St. James, which includes the tourist destination of Montego Bay, reports the Jamaican Observer.

The latest State Department travel advisory issued Jan. 10 warns Americans to exercise “extreme caution” when traveling to Jamaica. It warns Americans not to travel to areas including some areas of Kingston and Montego Bay.

US CRUISE SHIPS WERE HEALTHY IN 2017, SAYS CDC, DESPITE HEADLINES

“Violence and shootings occur regularly in some areas of Montego Bay,” it says.

“Violent crime, such as home invasions, armed robberies, and homicide, is common. Sexual assaults occur frequently, even at all-inclusive resorts. Local police lack the resources to respond effectively to serious criminal incidents.”

The state of emergency gives police additional powers, including the ability to search and detain without a warrant and shut down businesses.

A curfew has been imposed in both St. James and St. Catherine parish, west of Jamaica’s capital of Kingston.

Police in St. James also released photos of five men wanted in connection with various crimes, including murder.

The Associated Press contributed to this report.