The Nissan Leaf, the first of several electric cars being developed by major automakers, will sell for $25,000 including federal tax credits, Nissan announced Tuesday, making it roughly comparable to conventional autos and posing a significant test of consumers’ allegiance to gasoline-powered vehicles.

While a small number of electric cars have been traveling U.S. roads for years, the price of producing them has kept manufacturers from building them for a mainstream audience.

The relative affordability of the announced price surprised some industry observers. Nissan officials say breakthroughs in battery research, combined with a $7,500 federal tax credit for the battery-powered cars, has enabled the company to make the cars available at that price.

“Now we’re going to learn how consumers will react,” said Mark Perry, director of product planning and advanced technology at Nissan North America.

During the presidential campaign, Barack Obama pledged to put 1 million plug-in vehicles on the road by 2015. Whether he succeeds or not depends in part on whether the price for the Leaf, or for the forthcoming Chevrolet Volt from General Motors, is accepted by consumers. Both cars are expected to go on sale in the United States later this year.

Among the unknowns is how consumers will react to a car that must be recharged after 100 miles, and that to be really convenient, must be used with a home charging dock. The 220-volt dock will cost $2,200, including installation, according to the company. A tax credit will defray 50 percent of that cost as well.

Another potential drawback is that while the price is lower than many had expected, it is still a few thousand dollars more than comparably sized cars such as the Honda Civic or Ford Focus.

On the other hand, drivers will avoid trips to the gas station, saving money and time by charging at home. The energy costs for the electric car are roughly a sixth of a comparably sized gasoline car, according to Nissan, based on gasoline priced at $3 a gallon and electricity at 11 cents per kilowatt-hour.

There is huge pent-up demand for electric cars. Nissan expects to have 25,000 firm customer orders in the United States by December, when the car becomes available in some markets before going nationwide in 2011.