WASHINGTON — Federal regulators would have more authority to monitor electronic energy markets and guard against market manipulation under legislation approved Thursday as part of the congressional farm bill.

The provision would close what lawmakers have called the "Enron loophole," which was created in 2000 largely at the request of Enron Corp. It exempted electronic markets for large traders from government oversight.

"We are putting back the cop on the beat," said Sen. Carl Levin, a Michigan Democrat who sought the legislation along with Sens. Dianne Feinstein, D-Calif., and Olympia Snowe, R-Maine.

The provision was included in a $290 billion farm bill that was sent to President Bush with broad support. Both the House and Senate passed the bill with large margins, meaning it would be expected to override a threatened veto by the White House.

The energy trading provision gives the Commodity Futures Trading Commission enhanced authority to detect and prevent manipulation in the electronic energy markets, create audit trails, require more transparency in transactions and increase financial penalties for cases of market manipulation.

Government watchdog groups have criticized the lack of federal oversight of the energy markets and their electronic trading platforms, where most of the activity remains unregulated.

The senators said the recent increase in unregulated energy trading by speculators was partly to blame for higher oil and natural gas prices.

Feinstein said with oil prices hovering around $125 a barrel, it underscored the fragility of the energy sector and the need for increased oversight.

"We intend to see that there is no fraud and there is no manipulation of electronic trading platforms that use them because they believe there is more anonymity there," Feinstein said.

A probe last year by an investigative subcommittee led by Levin found that hedge fund Amaranth Advisors LLC, which collapsed after losing more than $6 billion in natural gas trades, had shifted its activities to an unregulated electronic exchange to avoid trading limits.

Levin's panel found that this "excessive speculation" raised homeowners' heating bills.