The cases were sent back to lower courts for further review, all but ensuring that Trump's financial documents, which he has long sought to protect, will not be handed over before the November presidential election.
Chief Justice John Roberts penned the 7-2 opinion in the New York prosecutor case, and was joined by Trump's two nominees, Justices Neil Gorsuch and Brett Kavanaugh. Justices Clarence Thomas and Samuel Alito filed dissenting opinions.
"(W)e cannot conclude that absolute immunity is necessary or appropriate under Article II or the Supremacy Clause. Our dissenting colleagues agree," the chief wrote, noting that the court is unanimous that there is no absolute immunity.
He added: "We reaffirm that principle today and hold that the President is neither absolutely immune from state criminal subpoenas seeking his private papers nor entitled to a heightened standard of need."
Roberts also wrote the 7-2 opinion in the House case, and was joined again by Gorsuch and Kavanaugh, both of whom penned concurring opinions. In that case, Thomas and Alito also dissented.
"While we certainly recognize Congress's important interests in obtaining information through appropriate inquiries, those interests are not sufficiently powerful to justify access to the President's personal papers when other sources could provide Congress the information it needs," Roberts wrote in the House ruling.
"(B)urdens imposed by a congressional subpoena should be carefully scrutinized, for they stem from a rival political branch that has an ongoing relationship with the President and incentives to use subpoenas for institutional advantage."
Thomas said in his dissent that he "would reverse in full because the power to subpoena private, nonofficial documents is not a necessary implication of Congress' legislative powers."
"If Congress wishes to obtain these documents, it should proceed through the impeachment power," he added.
"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. We will now proceed to raise additional constitutional and legal issues in the lower courts," Sekulow said in a statement.
Thursday's decision promises to reignite a criminal investigation by the Manhattan district attorney's office that started more than a year ago. Manhattan District Attorney Cy Vance's office has been examining whether Trump or the Trump Organization violated state laws in connection with hush money payments made to women alleging affairs with Trump. The investigation has also looked into whether business records filed with the state were falsified and if any tax laws were violated, CNN has reported.
On Thursday, Vance's office said its investigation had been delayed for nearly a year by Trump's lawsuit seeking to block grand jury access to his financial records, and said it would now resume, "guided as always by the grand jury's solemn obligation to follow the law and the facts, wherever they may lead."
Though the district attorney's investigation was hampered by lack of access to Trump's financial records, it has advanced in other ways in recent months. Investigators have interviewed former Trump personal attorney Michael Cohen as well as David Pecker, a longtime Trump confidante and the CEO of National Enquirer publisher American Media Inc., which admitted in federal court to having made payments during the 2016 election cycle to quiet a woman who alleged an affair with Trump.
In the House case, congressional Democrats argued they need the records from Trump's longtime accounting firm and two banks to further legislative inquiries into a variety of issues ranging from alleged hush money payments, illegal foreign involvement in a US campaign and potential violations of money laundering and ethics rules.
Trump's lawyers sued to block the subpoenas, arguing that although they are directed to third parties, they involve the President and members of his family and amount to an illegal fishing expedition.
Federal appeals courts ruled against the President.
During oral arguments, held over the phone in May, liberal justices pushed back on the argument from Trump's defense team that Congress has limited reach, with Justice Ruth Bader Ginsburg and the other liberals noting that President Bill Clinton and other presidents before him have turned over materials sought by Congress.
Trump Organization documents
A separate case involving efforts to access Trump's financial information was also ruled on Thursday. The DC and Maryland attorneys general can't get documents under subpoena from the Trump Organization at this time, the Fourth Circuit Court of Appeals said on Thursday, as it put on pause another major case about Trump's business holdings.
The case, related to the Constitution's emoluments clause, was another avenue where state-level leaders sought Trump financial information. It is different from the cases the Supreme Court decided on Thursday.
The appeals court had revived the lawsuit by Maryland and the District of Columbia over the ownership of Trump's hotel on Pennsylvania Avenue in Washington, and had sent several subpoenas. But the Justice Department is appealing to the Supreme Court on behalf of Trump.
This story has been updated.