My parent does not allow me to go to the mosque which is 10 mins away from my home for fajr and Esha salah. Because of fear that someone might attack me.Also because of these recent events. During Ramadan I used to stay in my grandparent place(less than 15 mins by car from my location) where I go to the mosque for fajr prayer alhamdulillah no harm happen to me just when I return home 3-7 days later an old man was attack by two men while going to the mosque on the same road that I used to go to the mosque the old man was robbed. A taxi driver was recently kidnapped by his clients during the day near my house. A human skull was recently found near my location. There are many houses that were robbed in my location(Including some of my neighbours). The most recent event that occurs in my country there was a boy that went to the shop at night and he was killed please note that my country has a population of of less than 1.3 millions people. Normally the road is supposed to be safe but nowadays it has become quit dangerous at night. So Is it compulsory in this situation for me to go to the mosque at night?
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Since the situation is as you mentioned, then your parents have a reason to be afraid about your wellbeing, so obey them and do not pray in the mosque at these two times, Fajr and ‘Ishaa', and it is hoped that Allah will record for you the reward of praying in the mosque. Kashshaaf Al-Qinaa’, reads:
“The reward of a person praying alone is not decreased, if he has an excuse, as Imaam Ahmad and Al-Bukhari reported that the Prophet said: “If a person is sick or traveling, it will be written for him/her the same reward as what he/she used to do when he/she was in his residence (not travelling) and in good health.” [End of quote]
The jurists have stipulated several excuses for which a person is considered to be excused from praying in the mosque, among which is fear. The Fiqh Encyclopedia reads:
“Fear: It is an excuse for abandoning the congregation, as Ibn ‘Abbaas narrated that the Prophet said: “If anyone hears the Aathaan (call to prayer) and is not prevented from joining the congregation by any (sound) excuse” he was (immediately) asked what is the (sound) excuse, to which he replied: “Fear or illness” (then he continued saying: “The prayer that he had prayed will not be accepted from him.”
Fear is of three types: Fear for one’s own self; fear for one’s wealth; fear for one’s family.
The first type is to fear that the ruler will take him (arrest him), or (fear) an enemy, a thief, a lion, a beast or a flood, or any such things that may harm him in himself....” [End of quote -Summarized]
Finally, if you pray at home, then you should be keen on praying on time in congregation at home. The reward of congregational prayer is not exclusive to the mosque; whoever prays in congregation anywhere will get the reward.
For more benefit, please refer to Fataawa 292729, 16360, and 363331.
Allah knows best.
You can search for fatwa through many choices