3. has subject-auxiliary inversion. This occurs in declarative clauses only when certain types of element are put in front position. Negatives are one very obvious type of element that trigger subject-auxiliary inversion when fronted: Never had I seen such chaos.
At no stage were they in danger.
"Only" is not negative, but it is semantically close to a negative, in that "Only John liked it", for example, entails "No one other than John liked it".