In August 2007, Mr. Hunt informed State Department officials directly of his intentions in Kurdistan, and on Sept. 5, three days before the deal was signed, a flurry of e-mail messages among Hunt and State Department officials make clear that the department was aware of what was in the works.

Image Ray L. Hunt, the chairman and chief executive of Hunt Oil, in an undated photo. Credit... Bloomberg News

In a message to a colleague with the subject line “Hunt Oil to Sign Contract With K.R.G.,” one State Department official gives a highly detailed summary of the agreement. Mr. Hunt, the official wrote, “is expecting to sign an exploration contract with the K.R.G. for a field located in the Shakkan district, an area under K.R.G. control (inside the Green Line) but technically in Nineveh Governorate.”

“Hunt would be the first U.S. company to sign such a deal,” the official wrote, suggesting that the news should be rushed onto the State Department’s internal distribution network as quickly as possible.

Despite those exchanges, a State Department official said Wednesday that the company had in fact been discouraged from completing its deal.

“All companies, including Hunt Oil, which have spoken with the United States government about investing in Iraq’s oil sector, have and will continue to be given the same advice,” John Fleming, an Iraq press officer in the State Department’s Bureau of Near Eastern Affairs, wrote Wednesday in an e-mailed response to questions. “We advise companies that they incur significant political and legal risk by signing any contracts with any party before a national law is passed by the Iraqi Parliament.”

Another State Department official, who asked to remain anonymous, expressed frustration, saying that a local State Department official in Erbil, the Kurdish provincial capital, who was the head of a so-called Regional Reconstruction Team, tried to dissuade Hunt officials from making the deal.

But no notes were taken at that meeting, the official said, and Hunt representatives later gave a conflicting account of what had been said.