When Mirko Chardin was 14, one of his best friends was shot and killed while being robbed of a pair of sneakers.
Chardin, afraid for his own safety, began carrying a gun. He was arrested after the gun fell out of his pocket in front of a plainclothes police officer.
When Chardin applied for a gun license 15 years later, he was rejected. The reason: A Massachusetts law bars him for life from being able to get a gun license based on his juvenile arrest on a firearms charge.
Chardin, who has not been in any trouble since then, is challenging the law before the state’s highest court, arguing that it violates the Second Amendment. The Supreme Judicial Court will hear arguments on Feb. 4.
‘‘We are seeking a determination that, as applied to Mirko Chardin — a person with a completely clean adult record, a person with a nonviolent juvenile record — that this is unconstitutional under the Second Amendment, his right to keep and bear arms,’’ said Edward George Jr., one of Chardin’s attorneys.
The law automatically disqualifies certain people from getting a gun license, including anyone adjudicated as a juvenile delinquent for committing a felony or a violent crime or for violating any weapons, ammunition, or drug law.
Chardin’s lawyers say many states have similar laws, but they do not contain lifetime bans like the Massachusetts law. In most states, people previously adjudicated of nonviolent offenses as juveniles may obtain a gun license after a certain number of years if they are able to show they have had an otherwise clean record.
‘‘For the most part, for every aspect of life, if you make a mistake as a juvenile, and you are an adult and you keep your nose clean, you are basically treated as though you have a clean slate,’’ said Susan Chu, Chardin’s other attorney.
George said Chardin went to college and graduate school, earning a PhD in teaching. Now 33, he is married and works as an administrator at a charter school. He applied for a license to carry a gun because he has a part-time job at a used-car business and wants a gun for self defense because he carries large amounts of cash to car auctions, George said.
State Attorney General Martha Coakley’s office is defending the law, arguing that it disqualifies only people who have committed serious crimes but does not ‘‘burden the rights of law-abiding and responsible citizens to bear arms for self-defense in their homes.’’
‘‘This is especially true as to Chardin, whose disqualification is based on a serious, weapons-related offense,’’ Coakley’s office argues in a legal brief filed with the court.
Commonwealth Second Amendment, a group that advocates for the protection of Second Amendment rights in Massachusetts, argues that there in a contradiction in state law.
On the one hand, state laws on juvenile crime are aimed at rehabilitating youth rather than punishing them. On the other hand, when someone who has been charged with a crime as a juvenile later applies for a gun license, their juvenile record disqualifies them, said Keith Langer, an attorney for the group who wrote a friend-of-the-court brief siding with Chardin.
‘‘By statute, children are not supposed to be treated as criminals . . . yet that’s exactly what the firearms licensing law treats them as,’’ Langer said.