The commentary from the following Bibles, namely The SBL Study Bible, The Catholic Study Bible, The Jewish Study Bible, and The New Oxford Annotated Bible with Apocrypha (using all the most recent editions) generally agree that the verses in Daniel refer to the Maccabean Revolt, the Jewish uprising against the Seleucid Empire that took place from 167–160 BCE.
They define the verses from Daniel 9:26-27 almost exactly the same as follows (the NRSV Updated Edition is being employed in the following):
After the sixty-two weeks, an anointed one shall be cut off and shall have nothing,
Sixty-two weeks, a round number to describe the period down from the 70 weeks (9:24) that point to the arrival of Antiochus IV Epiphanes. Anointed one, Onias III, the deposed high priest who was murdered in 171 BCE (see 2 Macc 4:32-34).
and the troops of the prince who is to come shall destroy the city and the sanctuary.
The prince, Antiochus IV Epiphanes. The city and the sanctuary, Jerusalem and the Temple.
Its end shall come with a flood, and to the end there shall be war. Desolations are decreed. He shall make a strong covenant with many for one week,
He shall make a strong covenant with many, describing the falling away of many Jews to hellenizing practices at 1 Macc 1:11-15.
and for half of the week he shall make sacrifice and offering cease,
A description of when Antiochus stops legitimate sacrifices and Jewish practice in Jerusalem (see Daniel 7:25).
and in their place shall be a desolating sacrilege until the decreed end is poured out upon the desolator.
The desolating sacrilege was described as a pig sacrificed to the Greek gods on the altar to YHWH. This ignited the war for religious freedom fought under the command of Judas Maccabeus which would in turn lead to the desolator being defeated, the re-dedication of the altar and Temple, and the yearly celebration of Chanukah.