A man who drew police gunfire as he allegedly fled a Dundalk traffic stop Sunday night has been arrested and charged with attempted murder.

Before midnight in the 3300 block of McShane Way, Baltimore County Police officers pulled over a man and while speaking to him they saw a gun between his legs, police said Tuesday. The driver ignored orders to raise his hands and accelerated, dragging an officer before crashing in an alleyway, police said.

An officer fired a gun during the encounter but did not strike the man, who ran before he was stunned with a Taser and was arrested, police said. While searching the suspect’s car, officers found two handguns, including one with a high- capacity magazine, and an auto sear switch used to convert a semiautomatic gun into an automatic, police said. Officers also found $15,000 in cash and a “large amount” of narcotics, they said.

The driver, who did not have an attorney listed in online court records, has been charged with attempted murder and first-degree assault, as well as possession of a controlled dangerous substance with intent to distribute, according to court records.