New Jersey residents have the right to walk around their homes and answer the door with a weapon—including those other than firearms—so long as they are not using them in a threatening manner unless they believe they are in danger, the state Supreme Court ruled.

In a unanimous ruling Thursday, the court overturned the conviction and 540-day prison sentence of a Monmouth County man, Crisoforo Montalvo, who answered the door of his apartment while holding a machete.