MAYBE AL ARMENDARIZ — until Monday, one of the Environmental Protection Agency’s top administrators — didn’t mean his comments to sound quite how they did. But they didn’t sound good. In a 2010 speech, now circulating online, Mr. Armendariz compared his “philosophy of enforcement” to ancient Roman soldiers’ practice of crucifying random victims in recently conquered territory.

The most reasonable interpretation is also among the most disturbing — that Mr. Armendariz preferred to exact harsh punishments on an arbitrary number of firms to scare others into cooperating. This sort of talk isn’t merely unjust and threatening to investors in energy projects. It hurts the EPA. Mr. Armendariz was right to resign this week, while EPA Administrator Lisa P. Jackson denied that his comments reflected the agency’s approach. Yet the question will remain: Is an aggressive attitude like the one Mr. Armendariz described common among EPA officials?

Maintaining the legitimacy of the EPA’s broad regulatory authorities requires the agency to use its powers fairly and, in so doing, avoid the impression that its enforcement is capricious or unduly severe. Mr. Armendariz’s comments violated the latter principle. Another recent, high-profile miscalculation on the part of the EPA violated the former.

Earlier this year, Mike and Chantell Sackett brought a case against the EPA to the Supreme Court, challenging a “compliance order” commanding the couple to halt work on a home near Priest Lake, Idaho. The Sacketts pointed out that the land was adjacent to other vacation homes and came with a sewer hookup. The EPA said that the couple was building on protected wetlands and that they couldn’t challenge that determination in court until much later, possibly after large fines accrued.

The justices sided with the Sacketts, granting them — and others in their situation — legal review of the EPA’s judgments. Yet the agency ought to have asked itself years ago whether it really needed to hassle a couple seeking to build a home in an existing subdivision, helping to justify every negative caricature of the EPA that Republican presidential hopefuls peddled during the primary race. Perhaps the agency would have been able to keep more of its regulatory power if it had been more judicious.

The lesson for Ms. Jackson and her boss, President Obama, from these two episodes is clear: The agency’s officers must have a clear sense when to deploy its mighty power and when to exercise discretion. That’s true for the sake of the economy and to ensure that the EPA will be able to continue its necessary work for years to come.