BOSTON – Boston declared a public health emergency Wednesday as flu season struck in earnest and the state reported 18 flu-related deaths so far.

The city is working with health care centers to offer free flu vaccines and hopes to set up places where people can get vaccinated. The city said there have been four flu-related deaths, all elderly residents, since the unofficial start of the flu season Oct. 1.

“The best thing you can do to protect yourself and your family is to get the flu shot,” said Boston Mayor Thomas Menino.

The city was experiencing its worst flu season since at least 2009, Menino said, with about 700 confirmed cases of the flu, compared with 70 all of last season.

Massachusetts was one of 29 states reporting high levels of “influenza-like illness,” according to the weekly flu advisory issued by the Centers for Disease Control.