Samurai (侍) were the military-nobility and officer-caste of medieval and early-modern Japan. In Japanese, they are usually referred to as bushi (武士,) or buke (武家). By the end of the 12th century, samurai became almost entirely synonymous with bushi, and the word was closely associated with the middle and upper echelons of the warrior class