The U.S. Transportation Security Administration is defending its decision to confiscate a frosted cupcake from a woman flying from Las Vegas' airport.

The TSA says in a blog comment posted Monday that the cupcake was packed in a jar filled with icing, which is considered a gel under a policy designed to secure travellers from terrorists seeking to evade detection by using explosives made of plastics, liquids or gels.

Rebecca Hains, of Peabody, Mass., was barred from taking her cupcake onto a plane last month when a TSA agent said icing in the jar exceeded amounts of gels allowed in carry-on luggage. Hains has called that "terrible logic."

The TSA says travellers can take cakes, pies and cupcakes through security checkpoints but should expect they might get additional screening.