Twenty-five would-be fliers learned an expensive lesson at the nation’s airports last week: It’s not a good idea to pack a gun in your carry-on bag.

In addition to 25 handguns — 21 of them loaded and six with a chambered round — the Transportation Security Administration confiscated nine stun guns, two “hair brush daggers,” and the usual assortment of knives, clubs and brass knuckles.

When TSA agents confiscate weapons at airport security checkpoints, they don’t give them back. They are turned over to local police. In some states where it’s legal to carry loaded guns, police may allow people caught with guns to check them or return them to their cars. Even relatively inexpensive handguns can cost several hundred dollars.

The fact that the passengers in these cases were allowed to continue their trips after their weapons were confiscated indicates that authorities found no reason to believe they were bent on terrorism or other violence. It also speaks to the number of people who carry weapons so routinely that they apparently forget they are in their purse, briefcase or backpack.

The TSA said the number of people getting caught with handguns is on the increase, but a spokesman said he wasn’t certain that 25 confiscations in a week set a record.

Fifteen of the guns were found at airports in the South or Southwest, with five of them in Texas. A loaded .45 caliber gun was confiscated April 27 at Dulles International Airport. Two were taken in Pittsburgh and one in Newark.

Two of the stun guns were discovered in Denver and two more in Sacramento.

It is legal to carry some weapons on airplanes, provided they are in checked luggage. They must be unloaded and secured in hard-sided, locked containers. Any toy or replica guns that could be mistaken for the real thing also are banned from carry-on bags.