San Francisco police arrested two men after an alleged auto burglary spree last month that spanned four miles across the northern part of the city and resulted in more than 40 items of stolen property.

San Francisco residents Jared Wilson, 31, and Delvon Carter, 21, were taken into custody on Jan. 27 after the pair broke into five vehicles, according to San Francisco police. Several of the crimes allegedly occurred while they were being shadowed by officers, who were able to contact most of the 18 victims and return their property, police said.

Wilson and Carter were booked into the San Francisco County Jail on suspicion of five counts of second-degree burglary, five counts of possession of stolen property, conspiracy, two counts of fraudulent use of license plates, intercepting police radio broadcasts to further the commission of a crime and resisting arrest.

Wilson was booked on an additional count of committing a crime while having been released on bail on his own recognizance. Carter faces separate allegations of possession of a burglary tool and driving on a suspended license.

Just before 3 p.m. on Jan. 27, plainclothes officers responded to a report of an auto burglary on the 100 block of Jefferson Street. Dispatchers broadcast a description of the suspects’ vehicle to police, and officers were able to locate the suspects a short time later at the Palace of Fine Arts.

The suspects committed another burglary while under surveillance, police said, but “potential safety risks to the public” prevented officers from intervening.

The officers continued to tail the pair to the Golden Gate Bridge Welcome Center parking lot, where the suspects cased and then burglarized three other vehicles “in a matter of seconds,” police said.

Police then followed the suspects to the Stonestown movie theater parking lot, described as a “lightly used” area, and made the arrests. The suspects fled on foot but were apprehended.

The officers recovered a police scanner, and the suspect vehicle displayed different license plates on the front and the rear, police said.

Auto burglaries in San Francisco remain high but have begun to level off after reaching epidemic levels. The break-ins peaked in 2017 with 31,000 incidents, then declined by 17% in 2018 and then another 3% in 2019.

Megan Cassidy is a San Francisco Chronicle staff writer. Email: megan.cassidy@sfchronicle.com Twitter: @meganrcassidy