The second time that King Antiochus IV attacked Egypt, he was not as successful as the first time. The ships of Kittim, or the ships of the Romans, came against him. Kittim was the name for Cyprus and thus applied to all western troops. Once again, on his way home, in 167 BCE, he attacked Jerusalem. This time, there was a clear explanation of what he did. He turned against the people of the covenant. He even helped those who had forsaken the covenant, taking sides in a dispute there as explained in 2 Maccabees, chapters 3 and 4. He occupied the Temple and the fortress citadel in Jerusalem. He even profaned the Temple by abolishing the regular burnt offerings. These invaders even set up abominations in the Temple to make it a desolation.
Here Daniel has a conversation between 2 holy ones, probably a reference to angels. One holy one or angel wanted to know how long the lack of the regular burnt offerings at the sanctuary would continue. The transgression of the sanctuary meant that the it and the people who worked there, the hosts, the priests, were trampled under. The response of the other angel was an exact time, 2,300 evenings and mornings, that turns out to be 1,150 days or about 3 ½ years. It was about 3 years that the sanctuary was defiled until 164 BCE.