Johnathan Cox, 25, (left) and Lonnie McMahon, 23. Credit: Maine Department of Public Safety

Two wanted in connection with an arson fire in Sanford earlier this month that displaced eight have been arrested.

Johnathan Cox, 25, was arrested by Sanford police Tuesday night and Lonnie McMahon, 23, was arrested by Berwick police on Monday, according to Stephen McCausland, spokesman for the Maine Department of Public Safety.

Both men are being held at the York County Jail in Alfred, he said.

The two men were wanted in connection with an early morning fire on July 6 at 26 Montreal St. that quickly spread from the single-family residence to neighboring 24 Montreal St., a two-unit apartment building.

The three residents of 26 Montreal St. and the five residents of 24 Montreal St. were all accounted for, Sanford police said earlier this month.

None of the residents of either address was injured, and several nearby homes were evacuated while firefighters from Sanford and surrounding towns battled the blaze.

Surveillance video from a nearby residence showed two unidentified individuals, one of whom appeared to be smoking, near 26 Montreal St. about 4:17 a.m., and another video showed two individuals running from the area moments later at 4:22 a.m. Firefighters responded to the scene about 4:26 a.m.

The Maine fire marshal’s office has determined the fire’s cause to be arson.

Related: Surveillance video from July 3 Sanford fire