In the Name of Allah, Most Gracious, Most Merciful.
All thanks and praise are due to Allah and peace and blessings be upon His Messenger.
Dear questioner, we would like to commend you for the great confidence you repose in us, and we hope that our efforts meet your expectations.
In the first place, we would like to stress the fact that while carrying out a legal punishment, the main concern of a Muslim should be to follow the very instructions of the Law-Giver (Allah) so as to achieve that the benefits the punishment as well as their desired positive goals. This can be achieved even without announcing the date of carrying out the punishment.
Thus, the issue of announcing the punishment or not is decided according to the general policy of the state, for there is no religious text to the effect that it is necessary to have people witnessing carrying out of the punishment save for the case of adultery.
Shedding more light on the issue, Dr. Anwar Dabbour, Professor of Shari`ah at the Faculty of Law, Cairo University, states:
There is no specific text demanding the witnessing of carrying out of the punishment except in the case of adultery. Thus, announcing the date of carrying out capital punishment may be published in local news. Some of the members of the official authority may attend the execution. The main purpose is to receive admonition and deter those who can repeat the deed. Thus, there is no text preventing announcing the date of the execution of death sentence or carrying it in a public place.
Dr. Yusuf Qasim, Professor of Shari`ah at Cairo University, adds:
In Shari`ah, it is commanded that while carrying out the punishment of adultery, a group of believers should witness the occasion. Almighty Allah says: “And let a party of believers witness their punishment.” (An-Nur 31:2)
Announcing the date of the execution of the punishment is necessary for deterring all evil thoughts that may occur in people’s minds. However, in case of murder it is not a condition. Informing some people of the date is sufficient.
Dr. Ahmad Abul-Wafa, Professor of International Law at Cairo University, also adds:
The matter is left to the general policy of the country and the government is to decide what is better and more beneficial. The punishment of adultery should not be taken as a pretext for demanding announcement, for this is a special case pertaining to adultery. In all other punishments, the condition was not specifically demanded by Shari`ah.
Almighty Allah knows best.