In DS9 Profit and Loss, three Cardassian political fugitives arrive at the station after evading the Cardassian military. Garak alerts the Cardassian Central Command of their presence. Gul Toran passes by his shop and tells Garak that he would be allowed to return home to Cardassia if he made sure the trio did not leave the station. Garak then successfully intercepts Lang, Rekelen, and Hogue as they board their ship to escape, and claims to be about to kill them… until Gul Toran swings by, tells Garak that he won’t be returning home regardless, and relieves him of his weapon. When Toran goes to shoot Lang himself, Garak produces a second phaser, vaporizes Toran, and allows the trio to escape. He justifies this to Quark in the closing moments of the episode by stating that “I love Cardassia.”
This is typical of Garak’s twisty tales and unclear motives, but it stands out as a case where Garak came extremely close to actually doing one thing, and winds up doing the exact opposite. Which leaves the question: what was he actually planning here? Did he intend to kill the three dissidents until he learned he wouldn’t personally benefit from doing so? Did he never intend to kill them, but wanted to lure Gul Toran into a trap and allow them to escape after? Or do his motives run even deeper somehow?
In this case, probably not - I think he knew Toran was setting him up.
Firstly, Garak and Toran clearly hate each other, and Garak expresses amusement that the Central Command listened to Toran when he recommended cancelling the prisoner exchange Garak had proposed.
Secondly, and probably more importantly, Garak didn’t think their deaths would be good for Cardassia:
Kill them, and all you’ll do is create martyrs.
I absolutely believe that at this stage of Garak’s character development, he would have executed them if he thought it would be for his idea of the “greater good.”
But he didn’t, so he played along until he could resolve the situation to his own satisfaction.
My view is that, as closely as this follows Casablanca, Garak really thought he was going to get what he wanted for turning the dissidents in, until Toran openly mocked him and he realized (like Renault) that the Cardassia he wanted to return to was no longer the Cardassia he knew. Then he turned.
I discussed this in r/DaystromInstitute here.