Praise be to Allah.
Their matter rests with Allaah, Who knows what their intentions were. The Prophet (peace and blessings of Allaah be upon him) was asked about one who fights because he is brave, one who fights for the sake of tribalism or nationalism, and one who fights in order to show off – which one is fighting for the sake of Allaah? He said: “The one who fights so that the word of Allaah will be supreme is the one who is fighting for the sake of Allaah.” (Agreed upon. Al-Bukhaari, 1/40; Muslim, 2/1513).
On this basis, the one who was fighting for the sake of Allaah and so that the word of Allaah will be supreme is considered to be a martyr.
And Allaah is the source of strength. May Allaah bless our Prophet Muhammad and his family and companions, and grant them peace.