If any portion of the Illinois National Guard in the performance of any duty is assailed, assaulted, attacked, or in imminent danger thereof, the commanding officer of such Illinois National Guard may at once proceed to quell such attack and disperse the attacking parties and take all other steps for the safety of his command that he may deem necessary.