A sloppily written law passed by Congress 15 years ago has cost the country several billion dollars in lost oil royalties in the Gulf of Mexico and threatens to cost the country billions more. Representative Edward Markey has been trying, without success, to fix the law. He argues that the profit-rich oil companies are absconding with money that rightly belongs to American taxpayers.

The Massachusetts Democrat is submitting a new bill to right this wrong. It smartly seeks to leverage President Obama’s promise to open up selected coastal waters to offshore exploration by insisting that these oil companies start paying royalties on all of their existing leases before receiving any new leases.

To encourage deepwater exploration in the Gulf of Mexico, a 1995 law offered generous incentives in the form of relief from royalties, then roughly 12 percent of the per-barrel price. The law was seen as a useful way to increase domestic production and reduce the country’s dependence on foreign oil.

Prices were low at the time, so the law contained a threshold of $28 per barrel (in 1994 dollars) beyond which royalties would resume. But this applied only to already signed leases. There was no clear language in the bill specifying price thresholds for new leases signed from 1996 to 2000. Some legislators involved in drafting the bill said later that they simply assumed that the $28 threshold would apply to both old and new leases.