A Texas man who was convicted of a series of weapons charges while a law student in Massachusetts is taking aim at the state’s gun licensing demands in a Hail Mary appeal that the Supreme Judicial Court has agreed to hear.

“I’m swinging for the fences, but I think what Massachusetts did to me was outrageous,” said John Cassidy, who is representing himself in the pitch to the state’s highest court. “I’m not an attorney, but it has always been my plan to fight this.”

Cassidy, who lives outside Houston, was arrested in 2011 for possessing two firearms, including an AK-47, five firearm magazines and roughly 150 rounds of ammunition in his apartment. He had recently moved to Massachusetts to attend UMass Law School at Dartmouth, and a spat with his then-roommate led the police to his apartment.

He had purchased the weapons legally in Texas, but had not yet gotten necessary permits in Massachusetts, according to court documents. After a winding legal saga, a jury found Cassidy guilty in March 2015 of seven firearms-related felonies, and he spent 26 months in state prison.

Now, Cassidy wants his convictions erased so that he can go back to law school and purchase guns again. He argues in his pitch to the SJC that the state’s licensing demands infringe on his Second Amendment rights.

“Massachusetts has stripped his Second Amendment right for simple in-home possessory offenses,” Cassidy wrote to the high court. “These unconstitutional violations are ongoing and continue to violate his natural rights.”

Last week, the SJC agreed to hear Cassidy’s case. He said he plans to come back to the Bay State and fight state prosecutors without a lawyer by his side. If he loses, he says he will take the fight to federal court.

“I’m going to go it alone. I have yet to find a Massachusetts lawyer that passionately believes in gun rights,” he said. “People don’t understand the idea of owning a gun simply because it’s your right.”

Brent Carlton, co-founder of Commonwealth Second Amendment, a nonprofit promoting the interests of Bay State gun owners, certainly gets that. But he’s concerned about the SJC’s decision to take Cassidy’s case. He says the high court picks cases that will allow it to restrict Second Amendment rights through precedent.

“They have a history of picking bad cases that are ripe for bad case law,” Carlton said. “The fact that they have accepted this case is setting off alarm bells for me.”

Meanwhile, Cassidy is researching gun laws and corresponding with the court from his family’s auto repair shop in the Lone Star State. And he says he can beat the odds.

“I think I have a shot,” he said. “I just want to be able to own guns and to go back to law school.”