Two months before the fatal 2012 terrorist attack on the U.S. compound in Benghazi, then-Ambassador Chris Stevens requested 13 security personnel to help him safely travel around Libya, according to a cable reviewed by Fox News -- but he was turned down.

In the July 9, 2012 cable, Stevens reported that, "Overall security conditions continue to be unpredictable, with large numbers of armed groups and individuals not under control of the central government, and frequent clashes in Tripoli and other major population centers." The cable said 13 security personnel would be the "minimum" needed for "transportation security and incident response capability."

But a congressional source said Patrick Kennedy, a deputy to then-Secretary of State Hillary Clinton, turned down the request.

The cable sent under Stevens' electronic signature shows that he was advocating for additional security and warning that the set-up did not meet State Department standards, as conditions deteriorated in the run-up to the attack that killed Stevens and three other Americans.

Clinton, now a Democratic presidential candidate, is set to testify Thursday before the congressional Benghazi committee at a hearing where the State Department's security measures in Libya are likely to be a focal point.

More On This...

    In the year leading up to the 2012 attack, records show, there were 234 security incidents in Libya, 50 of which took place in Benghazi -- including a June assassination attempt on the British ambassador in which a rocket-propelled grenade struck his vehicle. The team narrowly escaped.

    This attack preceded Stevens' July cable. While this intelligence was shared with the State Department, no additional security was added. The same month the British ambassador was targeted, there also was an IED attack on the U.S. Consulate, blasting a hole in the perimeter wall -- but still, security requests were denied.

    According to a congressional source, a senior State Department security officer in Libya told Senate investigators that, in September 2012, he had to choose between guarding the Tripoli airport -- their lifeline to the outside world -- and sending security with Stevens to Benghazi.

    He chose to reinforce the airport.

    "The system is not working well. We've seen that, not on one occasion but on many occasions," said Adam Zagorin, with the Project on Government Oversight. "I'm not aware that it's been fixed as we sit here today."

    Zagorin said there is a broader pattern of mismanagement when it comes to security and outside contracts.

    "Patrick Kennedy, who is the chief administrator of the department, has testified on quite a number of occasions about this," he said. "And frankly it's not clear -- he has offered assurances and reassurance to members of Congress that this is being taken care of -- and yet the pattern repeats so one has to question what is really being done."

    Further, the guard force at the Benghazi consulate, run by a contractor called Blue Mountain Libya, was in such disarray on Sept. 11, 2012, that they did not have a valid license to operate in Benghazi, according to emails obtained through a federal lawsuit.

    Documents first obtained by Judicial Watch and reviewed by Fox News show the partnership was dissolved after a dispute between the Libyan license holder and the parent company in Britain. After the terror attack, the Libyan company said it was willing to "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. ... Our prayers are with the families of the victims," according to a Sept. 12 email to the State Department.

    Despite the emails, the State Department has insisted there was no problem with the license.