The guard force at the U.S. consulate in Benghazi was in such disarray prior to the 2012 terrorist attack that the security status there was described as an “emergency” just three hours before the assault that left four Americans dead, according to State Department emails.

The emails also suggest the security contractor responsible for protecting State Department personnel there did not have a valid operating license.

"These documents show the situation in terms of security was toxic on September 11, 2012," Judicial Watch President Tom Fitton told Fox News. Judicial Watch obtained the emails through a Freedom of Information Act lawsuit.

"The State Department didn't know what to do about security, all this was happening literally hours before the attack," he said.

A Sept. 11, 2012 email sent between State Department security and contracting personnel said the consulate's guard situation was an "emergency." It also said, "... the two partners in this joint venture have been in dispute for some time.  We received a letter yesterday from the Libyan partner stating that the two partners have dissolved their relationship. The other side of the partnership, Blue Mountain Group (BMG) UK runs all operations in Benghazi. The dissolution of the partnership leaves BMG without a security license to operate in Libya."

More On This...

A Sept. 9, 2012 letter to the State Department contracting officer from lawyers representing the Libyan security contract holder -- also released by the federal court -- warned "... any use of such license by BMUK (Blue Mountain UK) in Libya shall be illegal and a clear violation of Libyan laws."

A Sept. 12, 2012 email to the State Department contracting officer seemed to reinforce the point. The lawyer for the Libyan license holder wrote his client "... shall put its differences with the security operators, Blue Mountain UK, to the side for the moment, and shall allow the use of its security license by BMUK to meet your full needs until a suitable alternative has been arranged."

Asked whether the consulate guard force was operating with a valid license, a State Department spokesman insisted the dissolution agreement between the two Blue Mountain security partners allowed them to operate.  

"On August 20, 2012, Blue Mountain UK notified the contracting officer at the Department that they had dissolved their business relationship with Blue Mountain Libya; however, the terms of the dissolution agreement permitted Blue Mountain UK to continue contract performance under the security license," he said.

Asked how the claim could be reconciled with the frantic email traffic on Sept. 11, 2012, the spokesman said he did not see a conflict.

Catherine Herridge is an award-winning Chief Intelligence correspondent for FOX News Channel (FNC) based in Washington, D.C. She covers intelligence, the Justice Department and the Department of Homeland Security. Herridge joined FNC in 1996 as a London-based correspondent.