The Libyan government had invested $500 million of its cash reserves with accused swindler Allen Stanford's firm as of late 2008, a court filing showed on Tuesday.

Stanford and Andrea Stoelker, his girlfriend, flew to Tripoli on January 25 because Libya was considering increasing the amount it had invested with him, according to a court document.

Stanford met with several officials, including Mohamed Layas, chief executive officer of the Libyan Investment Authority, the filing said.

A representative from the Libyan embassy in Washington was not immediately available to comment.

U.S. prosecutors cited the 2009 trip to Libya at a detention hearing as evidence that Stanford was a flight risk.

The Texas financier, who faces criminal charges related to a $7 billion fraud, was ordered by a federal judge to remain in custody until his trial.