ROME — Italy mourned those killed in the collapse of a bridge in the northern city of Genoa with a state funeral on Saturday as the country struggled to come to terms with a tragedy that government officials, families of victims and some experts say could have been prevented. But some families of the victims boycotted the event.

Flags flew at half-staff across the country on a day of national mourning. Stores shut their doors or draped black ribbons on their windows. And a solemn ceremony was held in Genoa for 19 of the victims of the Aug. 14 collapse.

The death toll rose to 40 on Saturday when one of the 10 wounded people still in hospital died and another victim was found, according to local officials. At least three people are still missing and a car matching the description of their vehicle was discovered on Saturday morning. But no bodies were found with the car.

The families of some victims shunned the funeral ceremony to protest against what they saw as a country that had betrayed their loved ones by not ensuring their safety.

