Irony is the difference between what one expects to happen and what actually happens. For example, when a fireman's house burns down, this is an example of irony. If a thief's house is robbed, this also is an example of irony.
In Liam O'Flaherty's short story "The Sniper," the major irony is what happens in the story that is totally unexpected by the reader.
The Republican sniper is the man that the author describes, whose progress he follows in detail. The other sniper is considered the enemy sniper.
O'Flaherty artfully weaves a tale of an IRA sniper in Dublin during the Irish civil wars, around 1922. By providing very little information about the other sniper, the reader concentrates primarily on the actions and reactions of the Republican sniper. He is described as a fanatic. He is filled with excitement, so much so that he didn't eat before he climbed to the roof to watch for Free Staters or sympathizers. He kills a soldier in an armored car, as well as an informant.
It is not until the Republican sniper lights a cigarette that the reader (and the sniper) become aware that there is another sniper nearby. As he feared, the light from the match he ignites promptly draws the attention of an enemy on another roof.
Almost immediately, a bullet flattened itself against the parapet of the roof.
Now begins the cat-and-mouse game between the two men. Both are excellent marksmen. Both are extremely cautious. The enemy sniper even succeeds in hitting the Republican sniper. However, the enemy sniper does not (it would appear) consider that the sniper across the way might play a trick on him. When wounded, the Republican sniper pretends to raise his head over the parapet to draw the enemy's fire. He succeeds, and pretends he has been killed. The enemy sniper exhibits the same curiosity that our sniper will, and very soon: he stands up believing the Republican sniper is dead. Immediately the Republican sniper shoots and kills his foe, who falls to the street below.
Rising, the surviving sniper knows he must get off of the roof before sunup. However, he is also curious about the dead man in the street below.
The plot shift comes so suddenly that the reader has no time to anticipate what lies ahead.
He decided that [the enemy sniper] was a good shot...He wondered if he knew him. Perhaps he had been in his own company before the split in the army.
These sentences operate as foreshadowing, but are effectively camouflaged and swiftly delivered.
Dodging enemy fire, the sniper runs over to the body. While he believes he may know the sniper's identity, he is completely unprepared for what he discovers:
Then the sniper turned over the dead body and looked into his brother's face.
This, then, is the occurrence of what is totally unexpected—this is the irony.