A man convicted of a South Portland armed robbery has asked the U.S. Supreme Court to decide whether Maine’s courts overstepped their bounds by stripping him of his constitutional right to a lawyer at trial and by ordering him to represent himself.

If the nation’s highest court takes up Joshua Nisbet’s case, it could become a national test of where people’s rights to a lawyer in a criminal case end, and whether criminal defendants can be forced to represent themselves as punishment for misbehavior.

Although Nisbet had no one to represent him at his trial in 2014, he has an attorney now. Jamesa Drake, an adjunct professor at University of Maine School of Law with a law practice in Auburn, filed a petition on his behalf to the U.S. Supreme Court that was docketed on June 1.

There is no guarantee the high court will hear the case, but Drake argues in her 24-page petition that federal appellate courts have issued conflicting opinions on the question and that state courts also have different standards.

“This court should grant review to resolve a deep split among the federal courts of appeal and state courts over whether a criminal defendant must expressly waive the right to counsel or whether and under what circumstances he may implicitly waive or forfeit that right,” Drake wrote in the petition.

Donald Macomber, an assistant attorney general for the state of Maine, said that he or one of his colleagues will sign on as the opposing party in the U.S. Supreme Court docket after receiving formal notice of Drake’s petition. But he said the state will not file a reply unless the high court asks for one.

Nisbet’s case was unprecedented in Maine. He remained in jail for about three years after his arrest in 2011 while awaiting trial, and during that time refused to cooperate with five different court-appointed attorneys.

The trial judge found that Nisbet threatened his fourth and fifth court-appointed attorneys during an interview at the jail and ruled that the court had “no other alternative” than to order Nisbet to represent himself. Nisbet has no legal training and repeatedly protested the judge’s decision, saying at each step that he wanted legal representation.

Nisbet, 39, most recently of Scarborough, was convicted of the robbery charge May 1, 2014, and sentenced to seven years in prison.

Nisbet appealed to the Maine Supreme Judicial Court, but the state’s highest justices unanimously rejected his claims in a decision issued on March 1.

“Nisbet waived his right to counsel because he willfully engaged in misconduct that the court appropriately warned him would result in the loss of representation,” the high court’s decision states. “Nisbet also forfeited his right to counsel because he engaged in egregious misconduct that manipulated that right in a way that was substantially detrimental to the court’s ability to administer justice, and because no lesser alternative was available to the court.”

Drake argued in her petition that the U.S. Supreme Court had ruled previously that a criminal defendant could be barred from the courtroom at trial, but had never found that a defendant’s right to an attorney could be forfeited and unwillingly waived for misbehavior.

“The deprivation of counsel cannot be used as punishment. The Sixth and Fourteenth Amendments are not that fickle,” Drake wrote.

Drake said in the petition that some federal appellate courts and state courts, including Maine’s, have adopted the doctrine that defendants can be found to have forfeited their right to an attorney. Other state and federal courts hold that defendants can be found, over their objection, to have waived counsel through poor conduct. And still other state and federal courts do not recognize either position.

Macomber said the Attorney General’s Office will await word this fall on whether the Supreme Court will take up the issue.