What were the primary purpose of state militias?

(CORRECT PLATO ANSWER ONLY)

A. To protect states from the federal government and each other
B. To provide emergency support during natural disasters
C. To protect from attacks by Native Americans
D. To build infrastructure for new towns