The time to pray Minchah lasts until evening; however, the poskim disagree about the exact final time. The disagreement lies in the question: when did the time to sacrifice the afternoon Tamid offering end? Some say that the time to throw the blood of the Tamid upon the altar was only until sunset, and therefore it is permissible to recite Minchah until sunset (Talmidei Rabbeinu Yonah, the Gra, Mishnah Berurah 233:14). Others say that the time of Minchah lasts until nightfall, since the time of the afternoon Tamid service lasted until night, whether it was for the throwing of its blood, or the offering of its fats and the raising of its libation – and that is the opinion of most poskim (Shulchan Aruch Rama 233:1).
In practice, one must try to finish reciting Minchah before sunset. However, b’dieved, one may rely on the opinion of the majority of poskim and pray within another thirteen-and-a-half minutes after sunset, for all opinions agree that night does not begin until then.
It is even permissible to recite the Thirteen Attributes of Mercy and Nefillat Apayim in those thirteen-and-a-half minutes after sunset (Mishnah Berurah 131:17; Yechaveh Da’at 6:7).
Concerning the option of either praying individually before sunset or with a congregation after sunset, there are differing opinions. Some say it is preferable to pray individually before sunset, although most poskim maintain that it is preferable to pray in a congregation even after sunset.
There are those who say that a minyan that began to pray late may not forgo Chazarat HaShatz, even if it is recited after sunset. Others say that it is best to skip Chazarat HaShatz so as not to recite it after sunset. In this case, the chazan starts to pray the first three berachot of the Amidah out loud, in order to grant the people praying the merit of reciting Kedushah. According to halachah, there is room for both opinions, and when there is a rabbi present, he must be the one to resolve this matter.
. According to Talmidei Rabbeinu Yonah, the blood of the Tamid was thrown on the altar until sunset, however according to Rashi it was also permissible to throw the blood of the Tamid at bein hashemashot (twilight). Additionally, even according to those who maintain that the throwing of the blood can only be performed until sunset, some say that the Minchah prayer corresponds to the offering of the organs of the Tamid, its meal offering, and the incense of the afternoon, whose time lasts b’dieved even through bein hashemashot. So it is written in Hagahot Maymoniyot and Minchat Kohen. Even if it is necessary to be stringent concerning the throwing of the blood, for it is a matter of doubt concerning a biblical commandment, still, regarding prayer, which is a rabbinic obligation, the halachah follows those who are lenient. Furthermore, Rabbeinu Tam’s opinion maintains that bein hashemashot only begins at the second sunset, which is 58 and a half minutes after the visible sunset. Therefore, according to him, this time is still considered completely day. Although, in practice, we do not follow Rabbeinu Tam’s opinion, nevertheless, many maintain like him and his approach can be added into the equation.
. According to the Gra, Mishnah Berurah 233:14, and Aruch HaShulchan 9, the time to recite Minchah only lasts until sunset. However, according to the majority of poskim, including the Shulchan Aruch, Rama 233:1, and Sha’agat Aryeh 17, it is also permissible to pray at bein hashemashot (twilight). So explains Yechaveh Da’at 5:22; 6:7, Yabia Omer, part 7, 34; and Piskei Teshuvot 233:6.
Although from sunset until the emergence of three stars, usually more time passes (some say approximately 18 minutes and some say approximately 25-30 minutes as explained in 25:5), nevertheless, since there are those who maintain that it is forbidden to pray Minchah at bein hashemashot, it is only permissible to be lenient regarding the time that is agreed upon by all the poskim to be bein hashemashot.
The poskim disagree as to whether it is permissible to begin praying within 13.5 minutes after sunset, when he is certain that his prayer will end after 13.5 minutes have already passed from sunset. Aruch HaShulchan 110:5 and Eretz Tzvi 121 permit doing so, whereas Magen Avraham 89:4 and Kaf HaChaim 233:5 forbid it. The Yabia Omer, part 7, 34 combines the opinions maintaining that bein hashemashot lasts 18 minutes with the opinion of Rabbeinu Tam, and on that basis permits starting to pray within 13.5 minutes. However, he does not permit beginning the Amidah repetition (Chazarat HaShatz) then.
Concerning the matter of Vidui and Nefillat Apayim, according to the Ben Ish Chai, Ki Tisa 8, it is permissible to recite Vidui within the whole time of bein hashemashot, and the Thirteen Attributes of Mercy until the middle of bein hashemashot (the time of the calling of the muezzin). However, regarding Nefillat Apayim, he writes in paragraph 14 that shev v’al ta’aseh (being passive and not actively doing something) is preferable and that one should not perform Nefillat Apayim during bein hashemashot. So writes the Kaf HaChaim 131:27 and 51; still, the opinion of most poskim is mentioned above.