“Spanish military patrols its own border with Morrocco,”
Thank you.
You answered your own “question “ then.
Well, its paramilitary. The Guardia Civil is a gendarmerie, a national police force, that can be militarized in case of war.
The Guardia Civil also form the national highway patrol, the forestry police, etc. And they are the default police in small towns and rural areas, that don’t have municipal police. The US doesn’t have anything like that, but its quite a common system around the world.