The term samurai originally meant "those who serve in close attendance to nobility", and was written with a Chinese character (or kanji) that had the same meaning.
What did 'samurai' mean at first?
those who serve in close attendance to nobility