In the Second World War he was captured, as a colonel of the Yugoslav Royal Army, during the Axis Invasion of Yugoslavia and survived the war in a prison camp, later returning to Yugoslavia.
In the Second World War, then a colonel in the Yugoslav Royal Army, Gavrilović was captured by the Axis during their invasion of Yugoslavia. He survived the war in a prison camp, later returning to Yugoslavia.