A passenger who was riding in a car that collided last month with one driven by an off-duty police officer has died, the Montgomery County police said.

Police said the collision occurred about 2:30 p.m. Aug. 29 at Routes 27 and 80.

The preliminary investigation indicated that the off-duty county police officer who was driving north on Ridge Road in an unmarked police vehicle spotted another car coming up fast from behind.

The approaching car, a Grand Am, tried to pass in the southbound lane, police said.

As it did, it struck a fender of the police car and crossed the southbound lane, continuing off the road, striking a fence and then a building, police said. It came to rest on its roof.

Police said the Grand Am’s driver and a passenger were taken to a trauma center in Baltimore with injuries that did not appear to be life threatening.

However, police said, the passenger, James Wilson, 53, of Beck Drive in Mount Airy, died Thursday. They said the off-duty officer was unhurt.

Police said the matter remains under investigation.

(This story has been updated.)