WASHINGTON -- The Supreme Court issued a mixed verdict Thursday on demands for U.S. President Donald Trump's financial records that will keep his tax returns, banking and other documents out of the public eye for the time being.

The court rejected broad arguments by Trump's lawyers and the Justice Department that the president is immune from investigation while he holds office or that a prosecutor must show a greater need than normal to obtain the records.

By 7-2 votes, the justices upheld the Manhattan district attorney's demand for Trump's tax returns, but kept a hold on Trump's financial records that Congress has been seeking for more than a year.

Trump, the only president in modern times who has refused to make his tax returns public, didn't immediately regard the outcome as a victory even though it is likely to prevent Trump's opponents in Congress from obtaining potentially embarrassing personal and business records ahead of Election Day.

The documents have the potential to reveal details on everything from possible misdeeds to the true nature of the president's vaunted wealth -- not to mention uncomfortable disclosures about how he's spent his money and how much he's given to charity.

"This is all a political prosecution. I won the Mueller Witch Hunt, and others, and now I have to keep fighting in a politically corrupt New York. Not fair to this Presidency or Administration!" .

The rejection of Trump's claims of presidential immunity marked the latest instance where Trump's broad assertion of executive power has been rejected.

Trump's two high court appointees, Justices Neil Gorsuch and Brett Kavanaugh, joined the majority in both cases along with Chief Justice John Roberts and the four liberal justices. Roberts wrote both opinions.

"Congressional subpoenas for information from the President, however, implicate special concerns regarding the separation of powers. The courts below did not take adequate account of those concerns," Roberts wrote in the congressional case.

The ruling returns the case to lower courts, with no clear prospect for when it might ultimately be resolved.

The tax returns case also is headed back to a lower court, but Trump's major arguments have now been rejected. Because the grand jury process is confidential, Trump's taxes normally would not be made public.

Justice Samuel Alito, who dissented with Justice Clarence Thomas in both cases, warned that future presidents would suffer because of the decision about Trump's taxes.

"This case is almost certain to be portrayed as a case about the current President and the current political situation, but the case has a much deeper significance," Alito wrote. "While the decision will of course have a direct effect on President Trump, what the Court holds today will also affect all future Presidents--which is to say, it will affect the Presidency, and that is a matter of great and lasting importance to the Nation."

Manhattan District Attorney Cyrus Vance Jr. said his investigation, on hold while the court fight played out, will now resume.

"This is a tremendous victory for our nation's system of justice and its founding principle that no one -- not even a president -- is above the law. Our investigation, which was delayed for almost a year by this lawsuit, will resume, guided as always by the grand jury's solemn obligation to follow the law and the facts, wherever they may lead," Vance said.

The case was argued by telephone in May because of the coronavirus pandemic.

The fight over the congressional subpoenas has significant implications regarding a president's power to refuse a formal request from Congress. In a separate fight at the federal appeals court in Washington, D.C., over a congressional demand for the testimony of former White House counsel Don McGahn, the administration is making broad arguments that the president's close advisers are "absolutely immune" from having to appear.

In two earlier cases over presidential power, the Supreme Court acted unanimously in requiring President Richard Nixon to turn over White House tapes to the Watergate special prosecutor and in allowing a sexual harassment lawsuit against Clinton to go forward.

In those cases, three Nixon appointees and two Clinton appointees, respectively, voted against the president who chose them for the high court. A fourth Nixon appointee, William Rehnquist, sat out the tapes case because he had worked closely as a Justice Department official with some of the Watergate conspirators whose upcoming trial spurred the subpoena for the Oval Office recordings.

The subpoenas are not directed at Trump himself. Instead, House committees want records from Deutsche Bank, Capital One and the Mazars USA accounting firm. Mazars also is the recipient of Manhattan District Attorney Cyrus Vance's subpoena.

Appellate courts in Washington, D.C., and New York brushed aside the president's arguments in decisions that focused on the fact that the subpoenas were addressed to third parties asking for records of Trump's business and financial dealings as a private citizen, not as president.

Two congressional committees subpoenaed the bank documents as part of their investigations into Trump and his businesses. Deutsche Bank has been one of the few banks willing to lend to Trump after a series of corporate bankruptcies and defaults starting in the early 1990s.

Vance and the House Oversight and Reform Committee sought records from Mazars concerning Trump and his businesses based on payments that Trump's former personal lawyer, Michael Cohen, arranged to keep two women from airing their claims of decade-old extramarital affairs with Trump during the 2016 presidential race.

------

Associated Press writer Zeke Miller contributed to this report