An Orcutt man has been arrested in an attempted armed robbery at a Wells Fargo ATM. 

The Sheriff's Office on Monday night released details of the incident that happened two weeks ago, and involved a school being placed on lockdown. 

At about 2 p.m. Nov. 6, a man armed with a knife approached a customer who was using the ATM, according to the Santa Barbara County Sheriff's Office.

Prior to the incident, deputies received reports of a suspicious man in the 5800 block of Ken Avenue.

Another report stated that a man, matching the same description, had knocked on the door of a residence on Ken Avenue while holding a knife in his hand.

St. Louis de Montfort School nearby was placed on lockdown as a precautionary measure. 

Deputies conducted a search of the area and were able to locate the suspect who was observed approaching a customer at a Wells Fargo ATM. When the customer turned to face the alleged subject, he allegedly pulled out a 12-inch-long kitchen knife, deputies said. 

The customer fled on foot, leaving his card in the machine.

Get news headlines sent daily to your inbox

Deputies confronted the suspect at gunpoint and reportedly saw him throw the knife into a nearby garbage can. 

The suspect, identified as 23-year-old Michael Fernandez, was taken into custody and found to be in possession of methamphetamine.

When deputies searched the garbage can, they reportedly located two knives -- a 12-inch kitchen knife with an 8-inch-long blade and an open locked butterfly knife with a 4-inch-long blade.

Fernandez, who was booked into County Jail on several felony and misdemeanor charges, is being held on $40,000 bail. 

Gina Kim covers crime and courts for Santa Maria Times. Follow her on Twitter @gina_k210