Dan 11.21 “He will be succeeded by a contemptible person who has not been given the honor of royalty. He will invade the kingdom when its people feel secure, and he will seize it through intrigue. 22 Then an overwhelming army will be swept away before him; both it and a prince of the covenant will be destroyed. 23 After coming to an agreement with him, he will act deceitfully, and with only a few people he will rise to power. 24 When the richest provinces feel secure, he will invade them and will achieve what neither his fathers nor his forefathers did. He will distribute plunder, loot and wealth among his followers. He will plot the overthrow of fortresses—but only for a time.
This is Antiochus 4 who seized control of the Syrian throne from his brother's son when his brother, Seleucus 4 died. It was a manipulated coup.
25 “With a large army he will stir up his strength and courage against the king of the South. The king of the South will wage war with a large and very powerful army, but he will not be able to stand because of the plots devised against him. 26 Those who eat from the king’s provisions will try to destroy him; his army will be swept away, and many will fall in battle. 27 The two kings, with their hearts bent on evil, will sit at the same table and lie to each other, but to no avail, because an end will still come at the appointed time. 28 The king of the North will return to his own country with great wealth, but his heart will be set against the holy covenant. He will take action against it and then return to his own country.
The "time of the end" here is established to be the end of Antiochus' oppression of Jerusalem. Initially Antiochus set forth to establish his control over Egypt by conquering Egypt. Later he goes to Egypt to establish a covenant agreement with his nephew, the king of Egypt.
My assumption is that at this point Antiochus goes home, having acquired wealth, and wishes to promote Hellenism, or paganism, in Jewish worship. 1st Jason obtains the high priesthood by bribing Antiochus. Then Menelaus bribes higher and displaces Jason. Both sought to appeal to Antiochus by promoting Hellenism, forbidden to the Jews by God.
29 “At the appointed time he will invade the South again, but this time the outcome will be different from what it was before. 30 Ships of the western coastlands will oppose him, and he will lose heart. Then he will turn back and vent his fury against the holy covenant. He will return and show favor to those who forsake the holy covenant.
Antiochus hears that his covenant with the Egyptian king had been betrayed and returns to attack Egypt. But he is stopped by threat of the Romans. That's when Antiochus' anger was vented at the Jews, whose former high priest, Jason, overthrew Antiochus' chosen high priest, Menelaus. This is where the "Abomination of Desolation" takes place, as Antiochus profanes the temple and murders thousands of faithful Jews. His chosen high priest, Menelaus, had been chosen to supervise a Hellenization, or paganization, of Israel's religion.
30 Ships of the western coastlands will oppose him, and he will lose heart. Then he will turn back and vent his fury against the holy covenant. He will return and show favor to those who forsake the holy covenant.
This is a reiteration of what had just been stated, that Antiochus heard of the rebellion in Egypt and invades Egypt. This is when he heard of the Jewish rebellion against his chosen high priest and acts against the holy covenant in Israel.
31 “His armed forces will rise up to desecrate the temple fortress and will abolish the daily sacrifice. Then they will set up the abomination that causes desolation. 32 With flattery he will corrupt those who have violated the covenant, but the people who know their God will firmly resist him.
33 “Those who are wise will instruct many, though for a time they will fall by the sword or be burned or captured or plundered. 34 When they fall, they will receive a little help, and many who are not sincere will join them. 35 Some of the wise will stumble, so that they may be refined, purified and made spotless until the time of the end, for it will still come at the appointed time.
So all this is the fulfillment of the "time of the end," which had been established as the terminal point of Antiochus' misdeeds.
Then we get the end of chapter 11, where the event is seemingly emphasized, by revisiting the major points of this history of Antiochus' reign.
36 “The king will do as he pleases. He will exalt and magnify himself above every god and will say unheard-of things against the God of gods. He will be successful until the time of wrath is completed, for what has been determined must take place. 37 He will show no regard for the gods of his ancestors or for the one desired by women, nor will he regard any god, but will exalt himself above them all. 38 Instead of them, he will honor a god of fortresses; a god unknown to his ancestors he will honor with gold and silver, with precious stones and costly gifts. 39 He will attack the mightiest fortresses with the help of a foreign god and will greatly honor those who acknowledge him. He will make them rulers over many people and will distribute the land at a price.
This is a greater description of the "abomination of desolation" when Antiochus' visits his wrath upon Israel after learning that his chosen high priest had been overthrown. He altered the typical Syrian worship to reflect his own choice of idolatry, and used this to profane Israel's worship.
40 “At the time of the end the king of the South will engage him in battle, and the king of the North will storm out against him with chariots and cavalry and a great fleet of ships.
This is after Antiochus in Syria hears of the Egyptian rebellion against him. It is a reiteration of verse 29. But it is also an overview of the wealth Antiochus had amassed and the authority he exercised. The Roman resistance is not this time referred to.
40 He will invade many countries and sweep through them like a flood. 41 He will also invade the Beautiful Land. Many countries will fall, but Edom, Moab and the leaders of Ammon will be delivered from his hand. 42 He will extend his power over many countries; Egypt will not escape.
This is an expression of the extent of his power when he attacks Israel. By that point he had conquered Egypt and associated countries. And after abusing Israel he continued to go after other countries, such as Persia. But this is where the "time of the end" happens, after all of these successes.
43 He will gain control of the treasures of gold and silver and all the riches of Egypt, with the Libyans and Cushites in submission. 44 But reports from the east and the north will alarm him, and he will set out in a great rage to destroy and annihilate many. 45 He will pitch his royal tents between the seas at the beautiful holy mountain. Yet he will come to his end, and no one will help him.
Hearing of Israel's rebellion against his chosen high priest, and hearing about Persian threats, Antiochus sets up his general's tent at Jerusalem. Then he goes off to fight in Persia and ends up dying on the way back. That is the "time of the end."
Michael arises at this point to defend Israel, which begins with the Maccabean resistance and the rise of Roman control over the region. That initiates the period of "great tribulation" for Israel, when Rome defeats Jerusalem and destroys the temple. This is the "Great Tribulation" Jesus referred to in his Ollivet Discourse, as Luke indicates armies surround Jerusalem and the Jews are sent into a long exile until Messiah returns (Luke 21).