A U.S. federal judge on Friday gave Toyota 30 days to turn over the bulk of documents sought by class-action lawyers from previous investigations of complaints about its cars racing out of control.

The order by U.S. District Judge James Selna marked a defeat for Toyota, capping the company's first courtroom skirmish with plaintiffs lawyers since scores of personal injury and class-action consumer claims filed in federal court against the automaker were consolidated last month.

The Japanese automaker faces potential civil liability estimated at more than $10 billion as it struggles to overcome an auto safety crisis that has badly tarnished its image.

Complaints of runaway vehicles have led to the recall of more than 8 million Toyota vehicles worldwide for repairs of ill-fitting floor mats and sticking gas pedals the automaker blames for surging engines.

Many of the lawsuits assert that at least some of the acceleration problems are rooted in an as-yet unidentified electronic glitch, which Toyota has vehemently denied.

Two key U.S. lawmakers have said their preliminary review of internal documents turned over to Congress suggest Toyota consistently dismissed the possibility of electronic failures for years without thoroughly examining the issue.

Plaintiffs attorneys were seeking immediate possession of roughly 125,000 pages of internal documents already submitted to congressional panels and auto safety regulators.

Those papers have remained largely confidential, except for a relative handful cited in recent congressional hearings on Toyota's handling of complaints of sudden, unintended acceleration in its vehicles.

FIRST COURTROOM SKIRMISH

They could prove valuable to plaintiffs' attorneys trying to substantiate their claims of product defects, negligence, fraud and other wrongdoing against Toyota Motor Corp. <7203.T>

Under Selna's order, Toyota has 30 days to turn over any English-language documents it does not consider privileged -- those involving communications with its own lawyers.

Selna gave Toyota up to 60 days to produce Japanese-language papers among the documents, said by the automaker to number some 20,000 pages.

Any documents containing trade secrets or other information that might compromise Toyota's competitive position will be kept confidential under a protective order the judge said he would issue in the next 30 days.

Plaintiffs lawyers argued that swift disclosure of the documents would ease the task of drafting a newly consolidated version of all legal claims seeking compensation from Toyota for economic losses -- such as diminished resale value -- stemming from the acceleration problems and related recalls.

We need all that material to form an educated complaint against Toyota, lead plaintiffs attorney Steve Berman told a hearing before Selna.

But Toyota's lawyers countered that requesting such documents at this stage is premature and violates basic rules of pretrial discovery that govern the sharing of information between the two sides in litigation.

They also said more time was needed to sort through the documents to determine which were privileged.

In the end, the judge insisted that 30 days was sufficient for the bulk of documents already delivered to Congress and the National Highway Traffic Safety Administration.

Selna also rejected Toyota's recommendations for how the plaintiffs attorneys should structure their revised complaint.

We're pleased with that, Berman said at the end of the hour-long hearing. The next hearing was set for June 23.

Toyota has said it is aware of nearly 230 federal lawsuits filed around the country for personal injury, wrongful death and economic loss claims stemming from acceleration issues -- all of them now wrapped together in the consolidated pre-trial proceedings overseen by Selna.

The company said it faces about 100 other lawsuits filed in various state courts around the country. About 40 of those are in California, where a state judge on Wednesday ordered them consolidated separately. He has recommended they be assigned to an Orange County court also.

NHTSA said this week that as many as 89 deaths could be linked to unintended acceleration in Toyota vehicles, up from a previous tally of 52 fatalities.

(Reporting by Steve Gorman; Editing by Dan Whitcomb and Matthew Lewis)