It was supposed to help clean the air, reduce dependence on foreign oil and bolster agriculture. But a little known market in ethanol credits has also become a hot new game on Wall Street.

The federal government created the market in special credits tied to ethanol eight years ago when it required refiners to mix ethanol into gasoline or buy credits from companies that do so. The idea was to push refiners to use the cleaner, renewable fuel, or force them to buy the credits.

A few worried that Wall Street would set out to exploit this young market, fears the government dismissed. But many people believe that is what happened this year when the price of the ethanol credits skyrocketed 20-fold in just six months, according to an analysis of regulatory documents and interviews with more than 40 people involved in the market, including industry executives, brokers, traders and analysts.

Traders for big banks and other financial institutions, these people say, amassed millions of the credits just as refiners were looking to buy more of them to meet an expanding federal requirement. Industry executives familiar with JPMorgan Chase’s activities, for example, told The Times that the bank offered to sell them hundreds of millions of the credits earlier this summer. When asked how the bank had amassed such a stake, the executives said they were told by the bank that it had stockpiled the credits.

A spokesman for JPMorgan, when asked about the exchange with the executives, disputed the account, saying the bank does not trade ethanol credits for a profit in the way it trades other securities, but is registered to deal in credits through its energy business.

From time to time, the spokesman, Brian J. Marchiony, said in a statement that the bank also purchased credits “on behalf of clients who need to fulfill their EPA-mandated obligations," though it had not done so in the past year.

But other market participants, including Thomas D. O’Malley, chairman of PBF Energy in Parsippany, N.J., identified JPMorgan Chase and other financial institutions as being active sellers of the credits this year. He said the institutions had helped transform an environmental program into a profit machine, contributing to the market frenzy this year. “These things were designed to monitor the inclusion of ethanol in the gasoline pool," O’Malley said. “They weren’t designed to become a speculative item. For the life of me I can’t see the justification for it."

While banks are by no means the largest player in ethanol credits, Wall Street’s activity in this market reflects a larger effort by financial institutions to exert their influence over loosely regulated markets for basic commodities, from aluminium to oil. The opacity of the ethanol credit market makes it difficult to determine the extent to which large financial actors have profited.

The banks say they have far less influence in the market than others are suggesting, and are doing nothing wrong. But the activities, while legal, could have consequences for consumers. In the end, energy analysts say, the outcome will be felt at the gas pump— as the higher cost of the ethanol credits gets tacked onto the price of a gallon of gasoline.

The Valero Energy Corp., a refiner that owns thousands of gas stations, says the squeeze in ethanol credits might cost it $800 million. PBF Energy, also a refiner, puts its bill at about $200 million. A review by The Times of a federal registry of nearly 1,500 businesses and individuals in the renewable fuel market found big Wall Street banks as well as a handful of people with troubled legal histories among the participants.

Though the ethanol credits are traded by many major investment houses, they were created not on Wall Street but in Washington, on Capitol Hill and at the Environmental Protection Agency.

The rules call for a set amount of ethanol, most of which is made from corn, and other renewable fuels to be blended with fossil fuels each year, with quotas assigned to individual refiners and importers.

Every time they mix ethanol into gas, or import fuel already blended with ethanol, energy companies get a credit from the government, and that credit can be sold to other companies that don’t blend ethanol to help them meet federal requirements. To monitor compliance, each gallon of ethanol is assigned a 38-digit Renewable Identification Number, or RIN. The EPA makes sure participants comply with the fuel standard. But rules that apply to almost every other market—on transparency, disclosure and position limits, for example—are not imposed on the trade of RINs, making Wall Street’s role harder to gauge.