By Grant McCool

"The record does not support the intervenors' claim that the employee compensation information is a trade secret," New York State Supreme Court Justice Bernard Fried wrote in the ruling.

New York Attorney General Andrew Cuomo for months has pressed for details on the billions of dollars paid to executives at banks given U.S. government bailout money, including $3.6 billion at Merrill, which was bought by Bank of America on January 1.

In court arguments on March 13, a lawyer for Merrill and Bank of America told the judge that the names were a trade secret and should not be made public, citing concerns over competition, privacy and security of those personnel.

The ruling comes as giant insurer American International Group is being hammered by legislators, Cuomo and the general public over bonuses to some of its executives.

"We will of course comply with the order of the court and turn over the information requested," said Scott Silvestri, a spokesman for the Charlotte, North Carolina-based bank. "We will continue to cooperate with the attorney general's investigation."

Merrill awarded bonuses just days before Bank of America completed its acquisition of the Wall Street investment bank and brokerage. Merrill lost $27.6 billion in 2008.

Bank of America has received $45 billion from the government's Troubled Asset Relief Program, including $20 billion in a January bailout.

Former Merrill Chief Executive John Thain and Bank of America Chief Executive Kenneth Lewis have testified under oath to lawyers at the attorney general's office on executive pay after receiving subpoenas. The bank asked the court to modify the subpoena, but the judge ruled against it.

"I conclude there is no legal basis for the proposed petitions to quash, fix conditions or modify subpoena and for a protective order," Fried wrote.

Cuomo called the ruling "a victory for taxpayers" and urged AIG to conform with his subpoena for bonus details.

"Bank of America chose litigation over transparency and we are gratified that this tactic has failed," Cuomo said in a statement. "AIG should take heed and immediately turn over the list of bonus recipients we have subpoenaed."

He said the deadline for responding was Thursday. On Tuesday, Cuomo released details of his probe into AIG, saying 73 employees received bonuses of $1 million or more in 2008, even as the insurer was being supported by $180 billion in taxpayer money.

The case is Cuomo v. Thain, New York State Supreme Court (Manhattan), No. 400381/2009.

(Reporting by Grant McCool, Editing by Toni Reinhold, Bernard Orr)