Thomas, 27, of Hagerstown, argued before hearing his sentence, telling McDowell that he did it out of "love for my woman and her children" to protect them from the man who was the target of his gun that day.
But the judge and Washington County Assistant State's Attorney Susan Lochbaum both noted that the victim, Antonio Mooney, was running away when the shots were fired.
Defense attorney Stephen Meyers said Thomas shouldn't get more prison time than a previous defendant who recently was sentenced to serve eight years for actually shooting Mooney on another occasion.
The charges stemmed from a Feb. 25 incident in which shots were fired at Mooney shortly before noon in the 400 block of Park Place.
Thomas later was apprehended on Charles Street in Martinsburg, W.Va., on Hagerstown City Police warrants.
Jailed briefly in the Eastern Regional Jail, Thomas was returned to Washington County to await trial on these charges a short time later.
According to Washington County court documents, Mooney was chased by a group of men that day. As he fled between two houses, he was followed by a man who fired several shots, court records said.
Police later found three spent shell casings from a 9mm handgun in the rear yard of a home in the 400 block of Park Place, according to court records. Police also found a building in the 440 block of North Jonathan Street that had been struck by a stray bullet.