Rashomon is a fortress or something. So yeah I am guessing they used it as a defense.

Kurosawa did a movie that took place at it.

Google it for more info.