This line shifts from peace and divine destiny back to threat: “But if a foreign enemy should dare…” It introduces a hypothetical invasion or attack. The anthem’s logic is: Mexico is destined for peace, but if someone violates the homeland, Mexico will defend itself.
Mas is a formal or literary way to say “but.” Osare comes from osar, meaning “to dare,” and it is an old-fashioned subjunctive form. Extraño enemigo literally means “strange enemy,” but in this context it means a foreign or outside enemy, not merely an odd person. The line is completed by the next one, which says what the enemy might dare to do.