A Roxbury man with a long history of gun offenses drew fire from Boston police early Tuesday after he shot at a moving vehicle in Dorchester and refused to drop his weapon, according to authorities.

“The defendant refused to comply … the officer discharged his department-issued firearm in the direction of the defendant, no one was hit,” said Michael Callahan, Suffolk assistant district attorney, during Michael Coke’s arraignment in Dorchester District Court Tuesday afternoon on five charges, including assault with a dangerous weapon.

It was the fourth time since July 31 that police agencies have fired at armed suspects. The most recent incident involved a wild, broad daylight shootout on Aug. 7 on Shepton Street in Dorchester, in which Boston police officers shot and killed a gunman. Two officers were shot in the leg during that gun battle.

Advertisement - Continue Reading Below

“It’s hard to tell if assaults on police are just a spike or a trend, but definitely we’re very concerned about it,” said Boston Police Commissioner Edward F. Davis. He said that while police have confiscated more guns this year than usual, homicides are down and shootings have “leveled out.”

Early Tuesday morning, Coke, a 38-year-old self-employed mechanic, allegedly shot at a moving car at 12:48 a.m. but did not hit the occupant or occupants.

Police nearby got out of their cruiser, announced they were Boston police officers, and pursued Coke, who was carrying a gun in his hand, as he ran toward the intersection of Kingsdale and Wales streets. The officers again identified themselves and ordered Coke to drop the weapon, but he refused, police said. An officer then fired in Coke’s direction, but did not hit him.

Police apprehended Coke a short distance away and recovered a loaded 9mm handgun on top of a nearby building. It was not clear how the weapon got there.

Many residents were either in bed or heading to bed when the shots rang out.

“I thought it was firecrackers at first,” said Jacqueline Harvey, 53, who has lived on Wales Street for 25 years. “I couldn’t tell whether it was gunshots or firecrackers so I went upstairs to ask my mother, who said it was gunshots. By that time the police had arrived.

“There’s stuff that happens around here, but lately it’s been quiet,” said Harvey, standing in her front yard as police searched for ballistics evidence on the street. “I’d like for it to return to quiet.”

Judge Rosalind Miller ordered Coke, who has a history of gun offenses dating back more than 15 years, held on $200,000 bail despite a request by the defendant’s attorney, Nancy Hurley, to set the amount at $5,000.

Hurley pleaded not guilty on her client’s behalf and told Miller that Coke was among a crowd of people standing near the intersection when shots rang out, and that her client fled from the gunfire along with others. When police pulled up, she said, her client complied with their request to raise his hands, at which point, “an officer fired his weapon.”

Hurley said Coke grew up in Boston, completed the 11th grade, and has five children ages 8 to 19.

A man who sat in on the arraignment and communicated with Coke as he was being led out of the courtroom identified himself as the defendant’s brother, but declined to give his name. In the hallway outside the courtroom, he disputed the prosecution’s statements.

“They shot at him, he was unarmed and they shot at him,” the man said. “How did the gun get on the roof if they were chasing him and ordered him to the ground? They didn’t say how the gun got to the roof.”

Coke was charged as an armed career criminal based on his prior convictions.

In 1997, he was sentenced to a year in jail for a firearms conviction. He has also been convicted in federal court stemming from an illegal possession of firearms charge in 1996. Coke received a two-year sentence in 2008 for a firearms conviction.

Along with Tuesday morning’s incident and the police shooting on Aug. 7 on Shepton Street, there have been two other times since July 31 that police agencies have fired at armed suspects.

In a traffic stop in Chicopee on Aug. 11, a state trooper shot and killed a suspect who started fighting with him.

On July 31, a Middlesex County Jail prisoner who was transported to the Massachusetts Eye and Ear Infirmary for treatment allegedly engaged in a violent fight with deputy sheriffs and took a deputy’s gun and shot him in the leg, before another deputy shot the suspect. The suspect survived and was arraigned on assault and battery with a dangerous weapon and other charges.