When he was drunk a 50-year-old man was seen putting a burning rag through the letterbox of a property in Lurgan.
There was a workman inside carrying out renovation work but came to no harm because a witness called police and detained the defendant.
Jerzy Stanislaw Zygmuntowicz, Mourneview Avenue, Lurgan, was jailed for six months last Wednesday at Craigavon Magistrates Court.
At a previous court he had pleaded guilty to damaging by fire a front door of premises at Union Street.
The case had been adjourned so that a pre-sentence report could be obtained.
A public prosecutor said that on November 2 last year at 12.25pm police were called to a suspected arson attack at Union Street in Lurgan.
A witness said he observed Zygmuntowicz put a burning rag through a letterbox.
The witness then got out of his car and detained the defendant before contacting police.
When he was interviewed Zygmuntowicz denied the offence and said he did not know anyone was in the property.
A solicitor representing the defendant said he had no previous record.
She added that he could not offer any explanation for his actions. He was intoxicated at the time and had difficulties with alcohol.
District Judge, Mrs Bernie Kelly, said this was an exceptionally serious charge.
She added that if it had not been for the swift intervention of a passer-by this could have resulted in the death of the workman who was in there at the time.
Judge Kelly said that the offence was so serious there was only one penalty she could impose as it had crossed the custody threshold.