Now Broward Circuit Judge Keathan Frink has decided that arbitrators last year were correct in ruling that the fired deputies should get their jobs back.
Both deputies should also be paid for sick and vacation time, overtime and off-duty detail pay, among other benefits that they would have received if still on the job, the judge confirmed.
Under Florida state law any discipline against law enforcement officers must be carried out within 180 days of the completion of any investigation.
One arbitrator ruled last May that Broward Sheriff Gregory Tony was two days late in firing deputy Miller and reinstated him.
And another arbitrator ruled that Sheriff Tony was 13 days past the limit when he fired deputy Stambaugh.
An arbitrator has not yet ruled on the case involving a third fired deputy, Edward Eason.
State investigators found that Mr Stambaugh had been working an off-duty shift at a nearby school when the shooting began at Stoneman Douglas.
His body camera footage showed that after driving to the school he got out of his truck, put on his bulletproof vest and remained in cover for five minutes after hearing shots fired.
He then drove to a nearby highway rather than towards the school.
Investigators found that Mr Miller, who was the first supervisor to arrive at the school, heard three or four shots but slowly put on his bulletproof vest and hid behind his car.
Mr Eason is accused of running the other way as shots were fired, before slowly putting on his bulletproof vest and body camera.
It is also claimed that he failed to make an official report when he received a 2016 tip that suspect Nikolas Cruz was making violent threats against the school in 2016.
Mr Cruz, 22, is awaiting trial and faces the death penalty if convicted.