Citing his city’s troubling rate of infection, Lawrence Mayor Daniel Rivera on Tuesday announced a new mobile testing initiative to better detect and prevent the spread of COVID-19.

To slow the spread, Rivera said, the city purchased a 40-foot-long, bright blue-and-yellow Mobile Health Unit that will be rambling through Lawrence city streets and offering free coronavirus tests for anybody who wants one.

“Every day we're trying to figure out [how] to get more people tested and make it easier,” Rivera said at a press conference in front of the Merrimack Court Housing Development. “If you see the Mobile Health Unit rolling through your neighborhood, follow it, go get tested. It is easy and it is free.”

The city of Lawrence, with a population of about 90,000, has the second highest daily incident rate of COVID-19 in Massachusetts while rating 19th for testing, he said. Nearly 5,000 residents have tested positive and 143 people have died.

Rivera said the city is paying $255,000 for the mobile unit, which will also provide flu vaccines, and, when there is a COVID vaccine, those too. The city has immediately launched a temporary van, which is smaller, while waiting for a new mobile unit to arrive in January.

Rivera also urged residents to wear masks and social distance. He said a big problem in the city is that people are not taking the disease seriously enough.

“People are still having parties in their homes and celebrations without wearing masks and social distancing,’’ he said. “We have to stop that.”