Why does the candle goes off in a bell jar?

in a belljar the amount of air is limited and oxygen is a must for burning so when the oxygen present in the air inside the belljar is used up the candle is extinguished