Stubby achieved the rank of sergeant major by serving in the trenches of world war i. He participated in 17 battles, saved soldiers' lives by detecting gas attacks, and captured a german spy, earning the respect and admiration of his fellow soldiers.