ExxonMobil Corp. (NYSE: XOM) sued the U.S. government on July 20, blasting as "unlawful" and "capricious" a $2 million fine levied against it for a three-year-old oil joint venture with Russia's Rosneft.

The U.S. Treasury Department earlier on July 20 slapped the world's largest publicly traded oil producer with the fine for "reckless disregard" of U.S. sanctions in dealings with Russia in 2014 when Secretary of State Rex Tillerson was ExxonMobil's CEO.

The lawsuit and the Treasury's unusually detailed statement on ExxonMobil's conduct represented an extraordinary confrontation between a major American company and the U.S. government, made all the more striking because ExxonMobil's former CEO is now in President Donald Trump's Cabinet.

RELATED: Trump Cabinet Positions Fill Up With Oil, Gas Advocates

ExxonMobil took the government to court despite the fact that the fine, the maximum allowed, would have a minor impact on the company, which made $7.84 billion in profit last year.

The fine came after a U.S. review of deals ExxonMobil signed with Rosneft, Russia's largest oil producer, weeks after Washington imposed sanctions on Moscow for annexing Ukraine's Crimea region.

Between May 14 and May 23, 2014, top U.S.-based ExxonMobil executives signed eight documents with Igor Sechin, the head of state-run Rosneft, the Treasury's Office of Foreign Assets Control (OFAC) said in the statement on its website.

OFAC said ExxonMobil had "demonstrated reckless disregard for U.S. sanctions requirements" by signing the deals with Sechin just weeks after the United States blacklisted him, OFAC said in the three-page statement.

The Treasury imposed sanctions on Sechin in April 2014 as part of measures to pressure Russia over its intervention in Ukraine, saying Sechin had shown "utter loyalty" to Russian President Vladimir Putin.

The sanctions prohibit U.S. citizens or people in the United States from dealing with those on the blacklist, such as Sechin. Rosneft itself is subject to narrower U.S. sanctions that still allow Americans to deal with the company on some transactions.

ExxonMobil said in a statement that OFAC's action was "fundamentally unfair," and sued the U.S. government in Texas in an effort to overturn the decision. The company is based in Irving, Texas.

In its 21-page complaint, ExxonMobil argued that Sechin "was subject to sanctions only in his individual capacity" and that guidance from the Obama administration at the time made clear that the sanctions "applied only to the 'personal assets' of the sanctioned individuals and emphasized that the sanctions did not restrict business with the companies those individuals managed."

Tillerson Not Consulted

Tillerson left ExxonMobil late last year to become secretary of state after 10 years running the company. He is now responsible for U.S. foreign policy, which includes helping make sanctions decisions.

The State Department referred questions about the fine to ExxonMobil and the Treasury. State Department spokeswoman Heather Nauert told reporters on July 20 that the agency was alerted to the fine on July 19.

A Treasury spokesman said OFAC engaged with ExxonMobil's lawyers only, and "did not discuss this case with Secretary Tillerson."

Tillerson said in January that he would recuse himself from matters involving ExxonMobil for one year after his December 2016 resignation, unless he is authorized to participate.

Though the State Department plays a major part in formulating sanctions policy, former U.S. officials and sanctions experts said it was unlikely the agency had a role in deciding the fine announced on Thursday, because it falls under OFAC's regulatory role.

The back-and-forth between the Treasury and ExxonMobil over the 2014 dealings spanned both the Obama and Trump administrations, and started with a subpoena from OFAC to ExxonMobil in July 2014, ExxonMobil said in its complaint.

ExxonMobil fully complied with guidance from Democratic former President Barack Obama's administration that ongoing oil and gas business activities with Rosneft were permitted, ExxonMobil spokesman Alan Jeffers said in a statement.

The Treasury "is trying to retroactively enforce a new interpretation of an executive order" inconsistent with its prior guidance, Jeffers said. "OFAC's action is fundamentally unfair."

ExxonMobil also cited a Treasury Department representative's comments in May 2014 that BP Plc (NYSE: BP) CEO Bob Dudley—an American citizen—could continue to participate in Rosneft board meetings so long as they related only to Rosneft's business.

In its statement explaining the fine, OFAC said that the Treasury Department representative's comments did not address ExxonMobil's conduct. BP did not immediately respond to a request for comment.

Publicly available guidance on the Treasury's website at the time of ExxonMobil's dealings with Sechin said Americans should ensure they do not enter into contracts signed by sanctioned individuals, OFAC said.

And by dealing with Sechin, the company "caused significant harm" to U.S. sanctions on Russia, the agency said.

Because Rosneft itself is not off-limits to Americans, another company executive could have signed the contract with no sanctions risk to ExxonMobil, said David Mortlock, who was a State Department and White House sanctions official under Obama.

"You could have Sechin standing over the guy's shoulder," said Mortlock, now an attorney at Willkie Farr & Gallagher LLP in Washington. "But the problem here is that it was signed by Sechin himself."

ExxonMobil said that approach would have flown in the face of standard business practice.

"You don't ask your business partner to have someone else sign instead of the CEO," said ExxonMobil spokesman Jeffers.

Opposition To Sanctions

ExxonMobil has long opposed U.S. sanctions on Russia, saying they harm American business interests and actually help European rivals.

Tillerson said in 2014 that the company did not support sanctions because they are not effective "unless they are very well implemented."

Sanctions were a contentious topic at Tillerson's confirmation hearing last January. At the time, Republican and Democratic lawmakers were concerned that Trump, whose associates are now under investigation for their ties to Russia, would try to quickly lift U.S. sanctions on the country.

"When sanctions are imposed, they by their design are going to harm American business," Tillerson said during the hearing, in response to a question about his views on them.

He also said that ExxonMobil "never directly lobbied against sanctions," a claim that was immediately challenged by senators who cited ExxonMobil's own lobbying disclosure forms.

The case is ExxonMobil Corp. v. Steve Munchin, et al, U.S. District Court, North District of Texas, No. 3:17-cv-1930.