WASHINGTON — Former Federal Reserve Chairman Alan Greenspan said Wednesday that while the country has been able to absorb sharp increases in oil prices, high energy costs are beginning to stunt economic growth.

But he also said sharply higher oil prices have not produced any “serious erosion” of world economic activity.

“The United States, especially, has been able to absorb the huge implicit tax of rising oil prices so far,” because the nation has become “far more flexible” over the past three decades because of globalization and less regulation, Greenspan told a Senate hearing. It was his first appearance before Congress since leaving the Federal Reserve in January.

However, he added, “Recent data indicate we may finally be experiencing some impact.”

Greenspan said high oil prices, exceeding $70 a barrel and pushing gasoline costs beyond $3 a gallon in many areas, are due to a sharp decline in spare global oil production capacity, refinery shortages and, to some extent, market speculation.

But he said market speculators also have been able “to hasten the adjustment” to higher prices and eased the shock to the economy.

He warned against import or price restrictions or other interference in the market, saying, “Growing protectionism would undermine that flexibility and make our nation increasingly vulnerable to the vagaries of the oil market.”

American business “to date has largely succeeded in finding productivity improvements that have contained energy costs,” though he conceded that consumers “are struggling with rising gasoline prices.”

Greenspan said that with limits on U.S. oil reserves, “we are not going to be a price setter in oil anywhere in the foreseeable future” unless there is a significant reduction in demand.

“We’re out of the market essentially as a very critical player with respect to price,” Greenspan told the Senate Foreign Relations Committee.

But he said “current oil prices over time should lower to some extent our worrisome dependence on petroleum,” with the development of alternative fuels and broader use of electric-hybrid cars. This “would help to wean us of our petroleum dependence,” Greenspan said.

Major Market Indices

“We are gradually ... weaning ourselves off petroleum. It is slow and in many ways like watching grass grow,” Greenspan said, adding that if the shift “happens smoothly, that is the best of all contingencies. ... But what happens if it doesn’t go smoothly.”

Greenspan said ethanol can become a significant alternative to gasoline, but the answer in the long run is not in corn, now the primary commercial source of the fuel in the United States, because of limited supplies. He urged rapid expansion of research into the development of cellulosic ethanol — made from wood chips, sawgrass or other material.

While Brazil uses sugar cane to make ethanol, corn accounts for virtually all of the ethanol produced in the U.S. Small amounts are made from other grains, according to the Renewable Fuels Association. Work on cellulosic ethanol is still in the laboratory stage.

“Find out if (it) really is a practical alternative,” he said, adding that only cellulosic ethanol will create the volumes adequate to replace large amounts of gasoline.