Syrian troops backed by gunboats and tanks expanded their offensive against democracy activists to the coastal town of Latakia on Sunday, in continued defiance of growing international pressure on the Syrian government to halt the violence and implement reforms.

Human rights groups said at least 21 people were killed in the latest assault, in which tanks and, for the first time, gunboats were used to shell seafront neighborhoods that had routinely been staging demonstrations calling for the ouster of President Bashar al-Assad.

The move indicated that the government remains undeterred by the growing chorus of worldwide condemnation over the harsh tactics being used to crush the revolt. More than 2,000 people have been killed, at least 300 of them since the military launched a heightened offensive against the protest movement two weeks ago.

Troops in tanks rolled into Latakia on Saturday, and on Sunday morning they began a sustained bombardment of the areas where protests had been held, according to witnesses in the city. Two gunboats deployed off the coast also briefly joined the shelling, said Ninar Said, an activist with the Local Coordination Committees, a group that documents and promotes demonstrations.

“There are continuous explosions. The security forces are everywhere, and they are firing randomly,” she said via Skype. “Also, there are many arrests . . . and all the people who have participated in protests are very afraid.”

A computer engineer in Latakia who sympathizes with the protests but does not participate said some neighborhoods had staged celebrations to mark the assault, an indication of the deep sectarian divide that marks the city as one of the country’s more dangerous potential flash points. Latakia has a sizable population of Alawites, the minority Shiite sect to which Assad and most members of his regime belong. The protests have been centered in Sunni neighborhoods, and those are the areas under assault.

The official Syrian news agency portrayed the attack as an effort to rid the city of armed groups, the term the government regularly uses to describe the protest movement. It said two members of the security forces were killed and 41 were injured in the operation.

“What is really taking place is a pursuit of gunmen who terrified people and vandalized public and private properties using machine guns and explosives,” the news agency said.

The assault on Latakia came after similar offensives against Hama and Deir al-Zour that seemed designed to thoroughly crush the uprising in the two cities that had witnessed the largest anti-government demonstrations.

But those assaults have triggered sympathy protests elsewhere, drawing larger numbers of people onto the streets in other parts of the country and prompting an even wider crackdown.

Thousands of people were detained over the weekend in suburbs of Damascus where protests had swelled in recent weeks, according to activists in the capital. One activist, who did not want to be identified because he fears for his safety, said he had lost count of those rounded up and herded onto buses as security forces went house to house arresting people in the suburbs of Saqba, Barzeh, Kfar Butna, Arbeen and Harasta on Saturday and Sunday.

The Obama administration has indicated that it is preparing to call for Assad to step down, but only after building an international consensus for tougher steps to isolate Syria, including energy sanctions and possible action at the United Nations.

But Syria’s neighbor Turkey, a key regional player with perhaps the most influence over Damascus, has given Assad a 10- to 15-day deadline to stop the violence and implement reforms. That has infuriated members of the opposition, who think that Assad will use the time to try to definitively crush the protest movement.

At a demonstration Sunday night in the central Damascus neighborhood of Midan, held to express solidarity with the people of Latakia, protesters displayed a sign referring to Turkish Prime Minister Recep Tayyip Erdogan, according to a video posted on YouTube. It read: “Thank you, Erdogan. Two weeks is enough time to slaughter all the Syrian people.”