Ford Motor Co ranked No. 1 for new car quality among mass-market brands while recall-hit Toyota Motor Corp plunged in a closely watched quality survey released on Thursday.

Toyota, grappling with a series of damaging recalls, fell below the industry average to place 21st in the influential study by J.D. Power and Associates -- its lowest ranking since the survey started 24 years ago.

Ford, the only U.S. automaker to avoid bankruptcy and a government bailout, climbed three spots to rank fifth -- the highest place Ford has achieved in the study.

Luxury brands captured the top four spots, led by Porsche and followed by Honda Motor Co's Acura, Daimler AG's Mercedes-Benz and Toyota's premium Lexus nameplate.

The results underscore the progress U.S. automakers have made on closing their long-criticized gap in quality with Asian automakers, and also the challenges facing Toyota in the wake of recent safety woes.

Overall, we're probably disappointed, but probably not surprised. If you look at when the survey was fielded, it was right during the heart of the recall and the intense coverage around the recall, Jim Lentz, Toyota's U.S. sales president, said on a conference call.

We are paying close attention to what the customers are telling us through J.D. Power, as we always do, and we'll make adjustments where necessary to make sure we're continuing to satisfy our customers, Lentz said.

The J.D. Power study, which records difficulties faced by new car owners in the first 90 days of ownership, was conducted between February and May this year.

Toyota has struggled to win back consumer trust after a series of recalls covering more than 9 million vehicles globally, mostly for the risk that sticky accelerators or ill-fitting floor mats could cause unintended acceleration.

Partly due to Toyota's problems, U.S.-based automakers on average scored higher initial quality than foreign brands for the first time in 24 years, the survey showed.

The Honda brand, Hyundai Motor Co (005380.KS), Ford's Lincoln premium nameplate, Nissan Motor Co's (7201.T) Infiniti, and Ford's Volvo rounded out the top 10 rankings.

This year may mark a key turning point for U.S. brands as they continue to fight the battle against lingering negative perceptions of their quality, said David Sargent at J.D. Power.

Achieving quality comparability is the first half of the battle; convincing consumers that they have done this is the second half, Sargent said at the Automotive Press Association.

The results of the survey, the most comprehensive benchmark of new car quality, are used heavily in auto industry marketing and are seen as influential in shaping consumer perceptions. It is also watched as a barometer for resale values and as a proxy for warranty costs.

U.S. automakers have spent heavily in recent years in a bid to close the gap with the Japanese automakers, led by Toyota and Honda, which had established a reputation for eliminating flaws from engineering and manufacturing.

Steady and meticulous attention to new model launches, along with consistency in how we do them across the brand and the globe, are having a very positive effect on the initial quality of our all-new or redesigned products, said Bennie Fowler, Ford group vice president of global quality.

General Motors Co's GM.UL Cadillac and Chevrolet brands respectively ranked 13th and 14th in the study, which measured 33 brands.

On average across the industry, U.S. consumers reported 109 problems per 100 vehicles sold, increasing slightly from 108 problems per 100 vehicles last year, J.D. Power said.

Other than Ford and Lincoln, domestic U.S. auto brands fell short of the industry average. Chrysler Group LLC's Ram truck brand ranked 11th, while its Chrysler, Jeep and Dodge brands placed 23rd, 27th and 28th.

(Reporting by Soyoung Kim, additional reporting by Ben Klayman; Editing by Richard Chang and Gerald E. McCormick)