By Brendan O'Brien

(Reuters) - A federal judge ruled on Friday that longtime Detroit-area Democratic U.S. Representative John Conyers should appear on an August primary ballot, saying Michigan registration rules that had disqualified him may violate his constitutional rights.

Conyers' bid for re-election had suffered a blow on Friday when state officials said errors in his nominating petitions left the 85-year-old politician without enough valid signatures to appear on the primary ballot.

He had been required to submit at least 1,000 valid signatures. But he fell short after hundreds of signatures were thrown out because they were gathered by people who were not registered voters in the state.

In ordering him onto the ballot, U.S. District Court Judge Matthew Leitman granted a preliminary injunction against a Michigan law requiring that petition circulators be registered state voters, saying the measure burdened Conyers' free speech and assembly rights.

"The state's interest in combating election fraud is compelling, but the state may protect that interest through less restrictive means," Leitman wrote.

Michigan Secretary of State Ruth Johnson had argued that the law helps combat election fraud because it would have the contact information of a registered voter if questions arose regarding the validity of signatures, court documents show.

Conyers is one of America's most prominent black politicians and is a former chairman of the U.S. House of Representatives' Judiciary Committee. He ranks second in seniority behind fellow Michigan Representative John Dingell, who is retiring this year.

His district is solidly Democratic. President Barack Obama won 85 percent of the vote in the district in his 2012 re-election, according to Democratic Party records.

Officials in the Michigan Secretary of State's office were not immediately available for comment, nor were Conyers' campaign staff.

(Reporting by David Bailey in Minneapolis, Brendan O'Brien in Milwaukee; Editing by Grant McCool)