ALBANY, N.Y. — In key swing states where Robert F. Kennedy Jr. believes he could spoil Donald Trump's chance to win the presidency, his campaign is fighting to remove his name from the ballot.

This week, two of those states, Michigan and Wisconsin, rejected the request. When Kennedy suspended his campaign and endorsed Trump last week, however, he said his supporters could continue to back him in most states and Wednesday his attorneys were in court attempting to restore his eligibility in New York.

"Robert F. Kennedy Jr. could have put his residence as the moon and no one would be confused with who Robert F. Kennedy is. Robert F. Kennedy is a member of one of the most distinguished political families in United States history," Kennedy's attorney Jim Walden said.

Earlier this month, a state Supreme Court judge disqualified Kennedy for listing what she deemed a sham residence on his designating petitions as an independent candidate. Attorneys on Wednesday, while not conceding it was wrong to list New York as his residence instead of California, argued the state is violating the 12th Amendment of the U.S. Constitution, by imposing an additional residency requirement to run for president. The original plaintiffs, backed by Democratic party-aligned PAC Clear Choice Action, said it's simply a case of non-compliance. 

"This is a process. This is just about filling out a form. Mr. Kennedy could live anywhere. He just wasn't allowed to lie about where he lives," attorney John Quinn said.

Complicating the 12th Amendment argument is the fact Kennedy's team did not, at first, notify the attorney general it was raising federal constitutional issues in state court, as required by law. His attorney acknowledged the mistake but told the panel of Appellate Division judges it should not be fatal.

"This court has wide discretion to forgive those sorts of problems and right here, this is a very significant constitutional issue that the federal courts are going to opine on," Walden said.

Among several other arguments, Kennedy's team said the plaintiffs did not serve all of the necessary parties, one of the candidate's delegates, which should disqualify the challenge to his eligibility. Depending on the ruling, either side may appeal to the state's highest court. 

The judicial system has incentive to move quickly as the deadline for the state Board of Elections to certify ballots and send them to the counties is Sept. 11 and the deadline to transmit absentee ballots to members of the military is Sept. 20.