son of a gun

(slang) an exclamation, usually used to show surprise or disappointment. The phrase has been in use for over two centuries and originally was a descriptive term conveying contempt in a slight degree, applied to boys born afloat when women were occasionally allowed to accompany men in ships of the British Navy. Voyages were frequently long and conditions cramped, and any woman about to give birth had to do so beneath or beside one of the ship's guns, behind an improvised screen.