The highest court in the US has ruled that the government was wrong to say it did not have the power to regulate exhaust gases from new cars and trucks.
The Bush administration opposes capping greenhouse gas emissions
Twelve states and 13 campaign groups brought the landmark case against the Environmental Protection Agency (EPA).
The US Supreme Court said the EPA had offered "no reasoned explanation" for refusing to regulate carbon dioxide and other harmful gas emissions from cars.
The ruling was close, with five judges voting in favour and four dissenting.
The justices had been asked to consider whether carbon dioxide (CO2) should be defined as a pollutant and therefore subject to a law regulating emissions.
The states and environmental groups who brought the case said the US government had a legal duty, under the Clean Air Act, to restrict greenhouse gas emissions.
The EPA had argued that the 1970 Act did not give it the powers to impose limits because CO2 was not deemed to be a pollutant.
Greenhouse gases - which occur naturally but which are also emitted by vehicles - have risen sharply over the past century, and many scientists believe they are contributing to global warming.
Observers say this is one of the most important environmental cases to reach the Supreme Court in decades.
BBC environment correspondent Richard Black says it settles a dispute which dates back eight years, since before George W Bush came to power.
The EPA argued that CO2 was not a pollutant it could regulate
The ruling says that unless the EPA can show that carbon dioxide is not involved in the warming seen around the world, the EPA should regulate it - and if it tries to make the case that CO2 is not involved, it would have a hard time winning it, our correspondent says.
By itself the ruling does not mean the Bush administration will change its approach to climate change, he adds.
But, combined with the turnaround in Congressional attitudes since the mid-term elections, growing state level legislation and the adoption of "climate care" by Evangelical churches, it makes significant action at national level within the next few years a lot more likely, he says.
The Bush administration has consistently rejected capping greenhouse gas emissions, saying such a move would be bad for business.
The court action was also vehemently opposed by car manufacturers and states where the car-making industry is important.
The ruling has been welcomed by US environmental campaigners, however, who have been fighting for greater regulation in a nation which accounts for a quarter of all greenhouse gas emissions.
In arguments before the court, the EPA, backed by 10 states, four motor trade associations and two coalitions of utility companies, argued that it did not have the authority to control greenhouse gas emissions.
However, Supreme Court Justice John Paul Stevens, giving the majority ruling, wrote that the EPA's position was "arbitrary, capricious or otherwise not in accordance with the law".
"Because greenhouse gases fit well within the Clean Air Act's capacious definition of 'air pollutant', we hold that the EPA has the statutory authority to regulate the emission of such gases from new motor vehicles," the court ruled.
The justices also rejected the administration's argument that the situation was so serious that it could not be resolved by a court ruling.
"While it may be true that regulating motor-vehicle emissions will not by itself reverse global warming, it by no means follows that we lack jurisdiction to decide whether the EPA has a duty to take steps to slow or reduce it."
The EPA said it was reviewing the court's decision in order to determine the most appropriate course of action.
The Alliance of Automobile Manufacturers, an industry group representing the chief carmakers in the US, responded by calling for "a national, federal, economy-wide approach to addressing greenhouse gases".