The US Supreme Court ruled on Thursday that President Donald Trump (pictured
) must hand over his tax returns to New York prosecutors but temporarily blocked Congress from accessing his financial records.
The rulings prompted a string of furious tweets from Trump and were a setback to his claim of absolute immunity from criminal investigation while in office.
At the same time, the rulings may allow Trump to keep his finances private until after the November presidential election.
SEE ALSO: Harris rebukes Trump in historic campaign-trail debut with Biden
The nation's top court ruled 7-2 against Trump in a case brought by Manhattan district attorney Cyrus Vance, a Democrat who is seeking eight years of the president's financial records in connection with an alleged "hush money" payment made to porn actress Stormy Daniels.
Both of the conservative justices appointed by Trump -- Neil Gorsuch and Brett Kavanaugh -- joined Chief Justice John Roberts in rejecting the sweeping claim by Trump's attorneys that the president enjoyed absolute immunity.
"Two hundred years ago, a great jurist of our Court established that no citizen, not even the President, is categorically above the common duty to produce evidence when called upon in a criminal proceeding," Roberts said. "We reaffirm that principle today."
The other case before the nation's highest court concerned a request by three Democratic-led congressional committees for Trump's tax returns and financial records and the president received a temporary reprieve there.
In another 7-2 ruling, the court sent the congressional case back to a lower court for further consideration, saying it needs to further examine the separation of powers questions raised.
SEE ALSO: China seeks to maintain friendship with the US to stabilise the world
Vance called the ruling "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.
Jay Sekulow, Trump's attorney, also welcomed the rulings, seeking to portray them as a win for the president.
"We are pleased that in the decisions issued today, the Supreme Court has temporarily blocked both Congress and New York prosecutors from obtaining the President's financial records," Sekulow said.
"We will now proceed to raise additional Constitutional and legal issues in the lower courts."
SEE ALSO: Trump escorted from briefing after shooting outside White House
Even if Trump's financial records are eventually turned over to the New York prosecutors by his accounting firm Mazars they may remain hidden from public view because of grand jury secrecy.
Trump reacted furiously to the rulings.
"This is about PROSECUTORIAL MISCONDUCT," he tweeted.
"This is all a political prosecution," Trump added. "Now I have to keep fighting in a politically corrupt New York. Not fair to this Presidency or Administration!"
Nancy Pelosi, Democratic speaker of the House of Representatives, said she would continue to press for Trump's financial records to be handed over to Congress.
"The Congress will continue to conduct oversight For The People, upholding the separation of powers that is the genius of our Constitution," Pelosi said. "We will continue to press our case in the lower courts."
The Democratic-led committees are looking into the president's finances and those of the Trump Organization and his family in what started as a probe into foreign influence in 2016.
Trump's secrecy over his tax returns and personal finances has prompted speculation about the New York real-estate magnate's true worth and possible financial entanglements.
Trump promised to release his tax returns during his 2016 campaign for the White House but has declined to do so.
US presidents are not required by law to release details of their personal finances but every US leader since Richard Nixon has done so.
The politically sensitive cases were being closely watched because of their potentially far-reaching implications on the limits of presidential power and congressional authority.
In both the New York and congressional cases, subpoenas were issued to Mazars, Trump's longtime accounting firm, as well as to Deutsche Bank and Capital One bank demanding his financial records for 2010-2018.
Daniel Hunter, a Deutsche Bank spokesman, said the bank "has demonstrated full respect for the US legal process and remained neutral throughout these proceedings. We will of course abide by a final decision by the courts."