DETROIT — The Toyota Prius hybrid, once viewed as a science experiment for environmentalists, has become a mainstream vehicle in the United States, with the company selling more than a million of the cars nationwide.

Toyota announced Wednesday that it had passed the million sales milestone, helped by brisk sales recently as U.S. gasoline prices continued to rise toward $4 per gallon.

The Prius, which is powered by both a gasoline engine and an electric motor, gets an estimated 51 miles per gallon in the city and 48 on the highway. Aside from electric vehicles, it is the most fuel-efficient car in the U.S., according to the Environmental Protection Agency.

“Prius paved the way for hybrids,” Bob Carter, Toyota Division group vice president and general manager in the U.S., said in a statement.

Toyota began selling the Prius 11 years ago when gas prices were low. At first it was a car for the environmentally conscious, but as prices spiked during the decade, its popularity increased. In the first quarter of this year, Toyota already has sold nearly 43,000, which is 52 percent more than at the same time last year, according to Autodata Corp. In 2010, the company sold more than 140,000 Priuses.

Prius sales worldwide topped 2 million last year, and Toyota said its total global hybrid vehicle sales passed the 3 million mark in last month.

As of Thursday, the nationwide average price for a gallon of regular gas was $3.71, up 88 cents from a year ago, according to AAA. The price peaked at $4.14 per gallon in July 2008, a year in which Toyota sold nearly 159,000 Priuses.

How does $4 gas affect you?

Have you bought a hybrid because of higher gas prices? Post a comment below.