Judas was about to deceptively turn Jesus in to the authorities. Jesus told his disciples to prepare. In the past when they traveled, it was without a sword, telling others about the Gospel. But now Jesus told them to get a sword. Prophetic words from the Old Testament saying they would call Jesus a rebel would be fulfilled.
Luke 22 ~
35 Then Jesus asked them, “When I sent you out to preach the Good News and you did not have money, a traveler’s bag, or an extra pair of sandals, did you need anything?”
“No,” they replied.
36 “But now,” he said, “take your money and a traveler’s bag. And if you don’t have a sword, sell your cloak and buy one! 37 For the time has come for this prophecy about me to be fulfilled: ‘He was counted among the rebels.’[a] Yes, everything written about me by the prophets will come true.”
38 “Look, Lord,” they replied, “we have two swords among us.”
“That’s enough,” he said.
39 Then, accompanied by the disciples, Jesus left the upstairs room and went as usual to the Mount of Olives. 40 There he told them, “Pray that you will not give in to temptation.”
41 He walked away, about a stone’s throw, and knelt down and prayed,42 “Father, if you are willing, please take this cup of suffering away from me. Yet I want your will to be done, not mine.” 43 Then an angel from heaven appeared and strengthened him. 44 He prayed more fervently, and he was in such agony of spirit that his sweat fell to the ground like great drops of blood.[b]
45 At last he stood up again and returned to the disciples, only to find them asleep, exhausted from grief.46 “Why are you sleeping?” he asked them. “Get up and pray, so that you will not give in to temptation.”