What is an old form of gunlock, as the flintlock, which ignites the priming by a spark; perhaps originally, a matchlock. Hence, a gun having such a lock called?

firelock — An old form of gunlock, as the flintlock, which ignites the priming by a spark; perhaps originally, a matchlock. Hence, a gun having such a lock. (Webster's 1913.)

Sources