Former congressman William J. Jefferson will go free from prison after a federal judge in Alexandria vacated his convictions on seven of 10 corruption charges and said Jefferson should get a new sentence in what remains of his case.

Jefferson, a Democrat from Louisiana, was convicted in 2009 of bribery and fraud and sentenced to 13 years in prison after a long-running FBI investigation into schemes involving African businesses. In a memorable aspect of the case, the government said Jefferson had stashed in his freezer $90,000 in cash that he intended as a foreign bribe.

“No one reading this opinion should conclude that Jefferson was innocent of crime; he was not innocent of crime,” Ellis wrote in throwing out most charges on which Jefferson had been convicted. “Even by McDonnell’s standard he engaged in and was convicted of some criminal conduct.”

Jefferson, 70, was found guilty at trial of using his congressional office as a criminal enterprise to enrich himself, soliciting and accepting hundreds of thousands of dollars in bribes to support his business ventures in Africa.

The former congressman clearly engaged in a conspiracy to bribe foreign officials, Ellis wrote, most famously with the money in his freezer that was intended for the vice president of Nigeria. And the judge said enough evidence was presented at trial to show that Jefferson used his position as a congressman to pressure the U.S. Trade and Development Agency to fund a study of a fertilizer project in Nigeria in exchange for bribes.

But other behavior did not include “official acts” as defined by the Supreme Court in the McDonnell case, Ellis ruled, because Jefferson merely set up meetings and expressed support for a high-tech company called iGate looking to break into the Ni­ger­ian market.

“The overwhelming weight of the government’s case with respect to the iGate scheme was focused on ‘constituent services’ and other activities that were not criminal,” Ellis wrote.

The Supreme Court ruled that McDonnell’s promotion of a nutritional supplement, which likewise included meetings and expressions of support, were not direct, corrupt uses of his office as governor.

While Jefferson did pressure African officials, Ellis said, official acts committed abroad are not covered by the bribery statute.

Jefferson already has served more than the five-year term he was handed on the bribery counts, and the rest of his sentence was set to run concurrently on all charges.

Jefferson’s time served leaves him facing resentencing on one count that still might expose him to extended prison time. But the judge said he should be set free pending a new sentencing hearing set for Dec. 1 because there is no guarantee that he would get a prison term longer than the time he already has served.

The judge also gave the government until Oct. 16 to tell him whether federal prosecutors intend to retry Jefferson on the vacated counts and on what legal grounds. Ellis cautioned in a footnote that either side could appeal his order but that a request for a stay pending appeal would probably not be granted.

Joshua Stueve, a spokesman for the U.S. Attorney’s Office for the Eastern District of Virginia, said they are weighing the decision about retrying Jefferson.

Robert Trout, who represented Jefferson, said defense attorneys were reviewing the judge’s order, but “we are obviously pleased that Judge Ellis has ordered Mr. Jefferson’s immediate release.”

Jefferson’s original sentence was the longest ever imposed on a member of Congress for corruption charges. A Kentucky businessman also went to prison for bribing Jefferson, as did a former congressional aide.

Jefferson is one of several politicians to benefit from the Supreme Court’s ruling on McDonnell, which has made it significantly more difficult for prosecutors to prove public corruption.