During Japan's feudal period, the MAIN role of the samurai was to
A) teach martial arts.
B) offer prayers before battles.
C) serve as advisors to the emperor.
D) protect the daimyos and their kingdoms.