A video has been posted in 2017 showing a huge crowd of people storming the Spanish border post in Ceuta. Another 700 illegal immigrants stormed their way into Ceuta in 2018. From the videos it is obvious that the border guards are armed, however they avoid using their weapons despite being overwhelmed and physically threatened (four border guards were hospitalized in the 2018 incident).
Do EU laws allow border guards to use their weapons to protect the European territory? If not, why are the border guards armed in the first place?