NEW YORK (Reuters) - Bank of America Corp <BAC.N> failed to persuade a federal judge to dismiss a lawsuit in which the United States accused it of causing taxpayers more than $1 billion of losses by selling thousands of toxic mortgage loans to Fannie Mae <FNMA.OB> and Freddie Mac <FMCC.OB>

In an order made public on Tuesday, U.S. District Judge Jed Rakoff in Manhattan said there are "genuine factual disputes" involving at least one of the government's theories to warrant letting the case continue.

Rakoff ruled four weeks before a scheduled September 23 trial.

(Reporting by Jonathan Stempel in New York; Editing by Gerald E. McCormick)