The Islamic concept of guarding the frontiers of Muslim lands with the intention of defending it against the enemies is called Ribaat. If we would count the blessings of Allah we would not be able to reckon them, Ribaat is one of the act to seek Allah's blessings. Allah is ever forgiving and his mercy supersedes his anger, more than everything else in this world, the believers feel the constant need to please Allah and seek his mercy to benefit in this life and the life hereafter.
Allah says in the Holy Quran;
"O you who believe, bear patiently, and encourage patience (endure), and do Ribaat (guard the frontiers of Muslim lands), and fear Allah, so that you may be successful" Aal-e-Imran 200
The Sunnah of the Holy Prophet SAW also teaches us that indeed Ribaat is a great act which provides the greatest reward of all after death. There are several sayings of the Holy Prophet SAW presenting glad tidings of Ribaat which are a source of inspiration and motivation for the believers, some of them are quoted below.
The Holy Prophet SAW said;
"Every act of a person will stop when he dies except Ribaat (guarding a
post/front-line) in the Way of Allah. This will be developed even after death up
to the Day of Resurrection."
"Ribaat in the Way of Allah for a day is better than anything in life. A journey
one takes on a morning or an evening in the Way of Allah is better than anything
in life."
"A day and a night spent in Ribaat (remaining at the frontiers of Islam with the
intention of defending Islamic territory against the enemies) are better than
one month spent in fasting and vigils. If he dies (in the fulfillment of this
task), he will receive the recompense of his deeds and subsistence, and he will
be protected from the Angel of the Grave."
"A day spent in Ribaat in the way of Allah is better than a thousand days spent
elsewhere."
"Two eyes will not be touched by the fire: the eye that has wept out of fear for
Allah, and the eye that has spent the night on the watch in the way of Allah."
"Ribaat for a day or night is better than fasting and standing in prayer for a month. If one dies during it, then his deeds that he used to do will continue (to earn reward) and his provision will also be give always and he will be safe from the mischief monger (al-fattaan)." Muslim, Tirmidhi, Tabrani
"If anyone engages in Ribaat for a night, guarding the Muslims behind him, then for him is the reward of those who stayed behind and kept fast and offered Salaat." Tabrani