A  federal judge on Friday ordered that Rep. John Conyers be put back on the ballot after elections officials had struck him from it, the latest twist in a saga that jeopardized the political future of the Democrat who has served nearly 50 years in Congress.

Rep. John Conyers (D-Mich.) was first elected to Congress in 1964. (AP photo/Carlos Osorio, File)

U.S. District Court Judge Matthew Leitman issued an injunction ordering Conyers back on the ballot just hours after state elections officials upheld an earlier ruling that had kept him off for failing to secure enough valid petition signatures. At issue was the question of whether a law requiring signature gatherers to be registered voters is constitutional.

Leitman said he was not issuing an opinion on that question Friday. But because the plaintiffs challenging the law "have shown a substantial likelihood of success" and "because time is of the essence," he said he opted to order that Conyers be put back on the ballot.

Leitman's order came the same day the Michigan secretary of state's office upheld a decision handed down May 13 by Wayne County Clerk Cathy Garrett. Garrett's office said Conyers submitted far fewer than the 1,000 valid signatures required to appear on the ballot. Leitman's decision puts him beyond the threshold.

Hundreds of signatures the Conyers campaign had gathered for the Aug. 5 primary had been ruled invalid by the county clerk and secretary of state after a challenge by the Rev. Horace Sheffield, Conyers's primary opponent, on the grounds they were not collected by registered voters. Hundreds more signatures were separately rejected.

In a brief interview with the Washington Post Friday, Conyers's attorney John Pirich said he expected Conyers to campaign as he normally would. "We all look forward to Congressman Conyers being victorious in August and again in November," said Pirich.

The state could appeal the ruling. But the office of Attorney General Bill Schuette (R) said Friday afternoon that no decisions had been made yet. "We are reviewing the ruling in consultation with the secretary of state," said Joy Yearout, a spokeswoman for Schuette.

First elected in 1964, Conyers is the current second-longest-serving member of the House behind fellow Michigan Rep. John Dingell (D), who is retiring this year. Conyers represents a district that includes parts of Detroit and its surrounding suburbs.

Updated at 6:01 p.m.