A place where a castle was built on a mountain was called "yamashiro," and when the era when a castle was built on a mountain to defend territories came, "城" was pronounced "shiro" during the latter medieval period.
しかし、山が城をなす土地に“やましろ”の読みが対応していたうえに、山に城を造ってそれぞれの領国を守る時代が訪れたので、中世後期には、“城”は“しろ”と読まれた。