A federal judge ruled on Thursday that a suit against Michigan's requirement that foster parents keep their firearms locked away at all times could move forward.

William and Jill Johnson sued the Michigan Department of Health and Human Services after William claimed he was told he’d either have to give up his gun rights or give up his grandson. Johnson said in his court complaint that a caseworker told him "if you want to care for your grandson you will have to give up some of your constitutional rights." He was later told there would not be a "power struggle" and the agency "would just take his grandson and place him in a foster home" if he refused to comply with their requests.

William claimed the agency required any guns owned by those who want to foster children must be locked away and be inaccessible at all times they are not "in use."

The Johnsons got a boost in court from the state's attorney general who filed a brief supporting their suit.

"As a practical matter, when a firearm is kept in a home for self-defense, it is always ‘in use,'" Michigan attorney general Bill Schuette wrote in his brief. "Criminals never take a day off, and they never call ahead. To serve its self-defense purpose, a gun must be readily accessible whenever its owner believes he might possibly need it."

Though U.S. District judge Paul Maloney dismissed a similar case brought by another couple, he ruled that the Johnsons' case could move forward against the request of the state agency.

"Storing firearms in an inoperable condition makes them useless for the defense of hearth and home, which implicates the Second Amendment," Judge Maloney wrote in his order. "The need for self-defense rarely comes with advance notice; it occurs spontaneously, often at times specifically chosen for the expected vulnerability of the intended victim."

The Second Amendment Foundation, a party to the suit, cheered the judge's decision and said common sense was on their side.

"We are delighted that Judge Maloney and Attorney General Schuette expressed such common sense perspectives," Alan Gottlieb, the group's founder, said in a statement. "This case is really all about common sense, as well as the right of citizens to be able to defend themselves and their homes and families."

Gottlieb said the group has fought similar cases in the past and is eager to argue the merits of the case.

"This isn't the first time we've had to challenge such a requirement by a state agency," he said. "We look forward to continuing the case."