NEW YORK — Former New York Assembly Speaker Sheldon Silver can remain free while he appeals his conviction and 12-year prison sentence, a judge ruled Thursday as she concluded that an appeals court will have to decide whether the jury received proper instructions on the law in light of a recent Supreme Court ruling.

U.S. District Judge Valerie E. Caproni said it was a “close question” whether legal instructions given to the jury that convicted the 72-year-old Democrat in a $5 million corruption scandal were erroneous in light of the high court’s findings when it reversed the public corruption conviction of former Virginia Republican Gov. Bob McDonnell.

She said legal instructions she gave the jury did not contradict the Supreme Court’s findings regarding what constitutes an “official act” that could result in a conviction.

Caproni said she did not tell “the jury that merely arranging a meeting, attending an event, hosting a reception, or making a speech are, standing alone, official acts.” But she added that the jury’s instructions did not include key language from the definition of official action spelled out in the McDonnell case.

“The charge did not include the three instructions that the Supreme Court in McDonnell held should have been given to the jury in that case,” she said.

She said it will be up to appeals judges to decide whether the “potentially erroneous charge was harmless.”

Silver’s lawyers had asked that Silver remain free pending appeal while prosecutors insisted that the McDonnell case did not redefine the boundaries of public corruption law enough to create the kind of substantial question on appeal necessary to delay imprisonment.

Prosecutors declined comment.

In a statement, defense lawyers Steven Molo and Joel Cohen said they were “grateful that the trial judge agrees that there is now a substantial legal question about the conviction.”

They added: “We look forward to vigorously pursuing Mr. Silver’s appeal.”

The ruling came several weeks after another judge found that New York’s former Senate majority leader, Dean Skelos, can remain free on bail while he appeals his conviction and five-year prison sentence in a separate corruption case. Skelos, a Republican, also was convicted last year.