Zorro would have been appalled.

A man who apparently is not the sharpest tool in the shed took a stab at trying to board a flight to São Paulo, Brazil, at Newark Airport carrying a sword on Friday.

The TSA — which posted a photo of the long-handled knife in its leather scabbard — said the passenger told agents he thought he could carry the weapon past the checkpoint “because of its value,” agency spokeswoman Lisa Farbstein said on Twitter.

“It was packed in a long box and was identified as a sword via X-ray machine. When opened, that was confirmed. Of course swords are weapons and as such they are prohibited past a TSA security checkpoint,” Farbstein told The Post in an email.

“The traveler was allowed to check the box with the sword with his airline so it flew with other checked baggage in the belly of the plane so that nobody had access to the weapon during the flight,” she added.

In her message on Twitter, Farbstein said: “Doesn’t matter to TSA how much the weapon is worth. No weapons should be brought in the cabin of a plane.”

In August, screeners stopped a New Jersey woman after she placed a walking stick on a conveyor belt at the airport with a long dagger concealed inside, Farbstein said at the time.

The Fort Lee woman said she got the stick from a friend and didn’t know the sword was inside.

“If you get a cane or walking stick as a gift, check for hidden knives and swords inside,” the TSA rep said in a tweet.