By Jonathan Stempel

NEW YORK (Reuters) - The U.S. government lawsuit accusing Bank of America Corp <BAC.N> of fraudulently selling toxic mortgage loans to Fannie Mae <FNMA.OB> and Freddie Mac <FMCC.OB> appears on track to go to trial next month after a judge rejected the bank's bid to dismiss the case.

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 against the second-largest U.S. bank. He said he will explain his reasons in due course.

Rakoff's order clears the way for the case to proceed toward trial, which is scheduled for September 23.

The government alleged that the former Countrywide Financial Corp, which Bank of America bought in July 2008, caused more than $1 billion of losses for taxpayers by selling home loans that later soured to Fannie Mae and Freddie Mac, the mortgage financiers seized by the government in September 2008.

According to the U.S. Department of Justice, the loans came out of a Countrywide program known as the "High Speed Swim Lane," or "Hustle" for short.

The government said Countrywide devised the program in 2007 to speed up the processing of home loans, even if it meant ignoring safeguards designed to ensure that the loans were sound and not tainted by fraud.

Bank of America spokesman Lawrence Grayson said: "This program ended before our purchase of Countrywide, as the government acknowledges. We believe there was no fraud."

The government had sued under the Financial Institutions Reform, Recovery and Enforcement Act (FIRREA), a 1989 law passed in the wake of that decade's savings-and-loan crisis.

FIRREA has a lower burden of proof and longer statute of limitations than other laws typically used in financial fraud cases. Earlier this month, Rakoff endorsed a broad interpretation of the law.

The case against Bank of America was originally brought by a whistleblower, Edward O'Donnell, a former executive vice president at Countrywide Home Loans.

In his order, Rakoff said he expects to decide by the start of any trial which legal theories if any the government may not pursue against Charlotte, North Carolina-based Bank of America.

The case is U.S. ex re. O'Donnell v. Bank of America Corp et al, U.S. District Court, Southern District of New York, No. 12-01422.

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