A surprising sales gain by General Motors Co and strong performances by Ford Motor Co and others helped put U.S. February auto sales on track for their highest annual sales rate in nearly four years.

U.S. auto sales in February are expected to rise 15.8 percent from the year-ago month, spurred by improving consumer confidence and the growing need for drivers to replace their aging cars and trucks. The gains came even as fuel prices shot up last month.

The annual sales rate, a closely watched industry yardstick, was projected to reach 14.7 million vehicles, JP Morgan said. That would be the best monthly showing since March 2008, before the financial crisis that sent Detroit into a tailspin.

There are a number of factors that are helping release this pent-up demand, GM's U.S. sales chief, Don Johnson, told analysts on a conference call. Perhaps the most encouraging sign is that home builders are becoming more optimistic.

Some analysts and industry executives have said that the U.S. auto sector will not recover significantly until U.S. home prices pick up and consumers feel more prosperous.

While U.S. economic data so far this year has been relatively upbeat, some of the gains reflect unseasonably warm weather. Analysts are watching gasoline prices, which early last year contributed to a softening in the economy that nearly pushed it back into recession.

GM, the largest U.S. automaker by sales, said the February sales rate could be as high as 14.9 million vehicles, topping the high end of analyst estimates.

GM's sales were helped in February by a strengthening economy and compact car sales, according to analysts and the company. The same factors helped other carmakers as well.

Chrysler posted a February U.S. sales increase of 40 percent compared with the year-ago period. Ford saw a 14 percent rise, Volkswagen AG was up 42.5 percent, Kia Motors Corp <000270.KS> gained 37.3 percent and Nissan Motor Co Ltd <7201.T> was up 15.5 percent.

The auto industry is three years into a recovery after a severe slump that led to the bankruptcies of GM and Chrysler in 2009. The U.S. industry was selling nearly 17 million vehicles a year on average in the 10-year period ending in 2007. Last year, the industry sold 12.8 million vehicles.

Short-term fluctuations in fuel prices will not hurt demand for new vehicles this year, but they could influence consumer preferences on what types of cars to buy, analysts said. Sales of Ford's Focus small car more than doubled in February.

TRUCKS AND SUVs

But sales of trucks and sport-utility vehicles were better than expected in February, analysts and executives said, despite the fact that gasoline prices on average rose 30 cents per gallon to $3.73 last month.

This is in stark contrast to spending habits in 2008 when average gasoline prices first topped $4 a gallon, spurring a mass defection from trucks to smaller cars, said Al Castignetti, head of the Nissan brand in North America.

Every time it happens, up until this point, we've seen the exodus, Castignetti told Reuters. Is the American public being conditioned to accept higher gas prices?

Auto sales are watched as one of the earliest indicators of U.S. consumer demand and the willingness of Americans to finance big-ticket purchases.

U.S. auto sales have benefited in recent months from consumers' need to replace aging vehicles, which many delayed during the depths of the economic downturn. The average vehicle on the road is a record 10.8 years old.

GM sold 209,306 vehicles last month, up 1.1 percent from the previous February. Analysts had predicted a decline in GM sales as the No. 1 U.S. automaker offered fewer incentives compared with a year earlier.

Ford sold 179,119 cars and trucks in February, while Toyota Motor Corp <7203.T> sales rose 12.4 percent to 159,423 vehicles.

Chrysler, the U.S. automaker majority-owned by Fiat SpA , sold 133,521 cars and trucks last month. Volkswagen sold 30,577 vehicles, and new vehicle sales at Nissan rose to 106,731 last month.

GM predicted the annual sales pace in February would be between 14.5 million and 14.9 million vehicles.

Chrysler projected 14.9 million units, while Ford said it would be as high as 15 million units. Both Chrysler and Ford include medium and heavy trucks in their forecasts, which add up to 300,000 vehicles to the total.

On average, 38 analysts surveyed by Thomson Reuters expected

February sales to hit an annualized pace of 14 million vehicles with the high estimate at 14.4 million. That compares with 13.3 million a year earlier.

GM shares were up 1.5 percent at $26.42 on Thursday afternoon, while Ford shares were up 2.1 percent at $12.64.

(Reporting By Deepa Seetharaman and Ben Klayman; Editing by Maureen Bavdek, Mark Porter and Matthew Lewis)