LONDON — The motorcade carrying the U.S. Ambassador to Bangladesh was attacked by a group of armed men in the country's capital Dhaka, the U.S. embassy said on Sunday.

The men, some of whom were on motorcycles, attacked the official convoy in the Mohammadpur district of Dhaka on Saturday, the embassy said in a statement. Outgoing ambassador Marcia Bernicat, her security team and the drivers were all unharmed but two security vehicles were damaged.

The attack came as protesting students angry over the traffic deaths of two fellow students paralyzed the city and left it cut off from the rest of Bangladesh for an eighth day.

On Sunday, students blocked roads and disrupted traffic, although they maintained emergency lanes for ambulances and other emergency vehicles. Home Minister Asaduzzaman Khan on Sunday warned that action would be taken against them if their protests become too disruptive.

Bangladeshi students shout slogans and block a road during a protest in Dhaka, Bangladesh on Aug. 4, 2018. Five days of protests by tens of thousands of students angry over the traffic deaths of two of their colleagues have largely cut off the capital Dhaka from the rest of Bangladesh, as the demonstrators pressed their demand for safer roads. A.M. Ahad / AP

The owners and workers at bus companies have said they will not start running services to Dhaka from other parts of the country until they feel safe, after dozens of vehicles were vandalized or torched in the capital and elsewhere.

In the district of Dhanmondi, a 20-minute drive south from where the U.S. ambassador's motorcade was attacked, police fired tear gas and used batons to disperse hundreds of protesters Saturday, leaving many people injured. Local media reported that police continued to fire tear gas into the crowds on Sunday.

Thousands of other students took to the streets elsewhere in the city, but no major violence was reported.

In a separate statement released Sunday, the U.S. embassy described the protests as peaceful, adding that they had "captured the imagination of the whole country."

"While we don't condone the actions of a few who have engaged in senseless property destruction, including of buses and other vehicles, nothing can justify the brutal attacks and violence over the weekend against the thousands of young people, who have been peacefully exercising their democratic rights in supporting a safer Bangladesh," it said.

Meanwhile, Bangladeshi Prime Minister Sheikh Hasina announced Sunday that the police had launched a crackdown on dangerous driving as she attempted to quell the unrest.

"Our police force has started a week-long drive to bring discipline on the roads," she said at an event in the city.

People and students take part in a protest over recent traffic accidents that killed a boy and a girl, in Dhaka, Bangladesh, on Aug. 4, 2018. Mohammad Ponir Hossain / Reuters

The protests began last Sunday after two college students were struck and killed by a pair of buses which were racing to collect passengers, a common occurrence in the city of 10 million people, which is regularly gridlocked by traffic chaos.

The protesters are demanding safer roads in Bangladesh, where corruption is rife, making it easy for unlicensed drivers and unregistered vehicles to fill the roads. More than 4,000 people die each year in road accidents often blamed on faulty vehicles, reckless driving and lax traffic enforcement, according to the World Bank.

The students have stopped thousands of vehicles — including those of top officials and judges — demanding to see if the cars were registered and the drivers licensed. Buses are key to transportation in Bangladesh, where trains are overcrowded and most people cannot afford cars.

Spontaneous student protests are rare in Bangladesh and are an embarrassment for the prime minister ahead of a general election due in December.

Tear gas shells are seen on the road after demonstrators clashed with the police during a protest over recent traffic accidents that killed a boy and a girl, in Dhaka, Bangladesh, August 5, 2018. MOHAMMAD PONIR HOSSAIN / Reuters

Hasina’s party is blaming the main opposition Bangladesh Nationalist Party, headed by former Prime Minister Khaleda Zia and its main ally Jamaat-e-Islami, for using the sentiment of young students to create chaos for political gains.

The Bangladesh Nationalist Party denied any involvement in the protests but extended its support to the students.

Hasina also said the protesters' demands are justified and pledged to fulfill them in phases.