Donald Trump on Wednesday declined to answer questions under oath in New York over alleged fraud at his family business, as legal pressures pile up for the former president whose house was raided by the FBI just two days ago.

Trump said he had "no choice" but to invoke the fifth amendment, which allows individuals to remain silent to protect against self-incrimination under questioning.

In a statement Trump said "I declined to answer the questions under the rights and privileges afforded to every citizen under the United States Constitution," saying he took the advice from his legal counsel.

"When your family, your company, and all the people in your orbit have become the targets of an unfounded, politically motivated Witch Hunt supported by lawyers, prosecutors, and the Fake News Media, you have no choice," Trump said.

"If there was any question in my mind, the raid of my home, Mar-a-Lago, on Monday by the FBI, just two days prior to this deposition, wiped out any uncertainty."

Trump earlier said on social media he was in the offices of New York Attorney General Letitia James, whose investigation is one of several active probes into the brash billionaire's business practices and other actions.

The former president took to his Truth Social platform to launch a barrage of attacks on James, branding her a "racist" attorney general who is "trying to 'get Trump.'"

James is conducting "a continuation of the greatest Witch Hunt in U.S. history!" Trump wrote. "My great company, and myself, are being attacked from all sides. Banana Republic!"

James suspects the Trump Organization fraudulently overstated the value of real estate properties when applying for bank loans, while understating them with the tax authorities in order to pay less in taxes.

Trump and his eldest children, Donald Jr and Ivanka, had been due to start testifying under oath in July but the depositions were postponed due to the death of the former president's first wife.

The Trumps have denied any wrongdoing, and the former Republican leader has charged that the probe is politically motivated.

If James, an African-American Democrat, finds any evidence of financial misconduct, she can sue the Trump Organization for damages but can not file criminal charges, as it is a civil investigation.

Trump's son Eric hit out at James in a tweet Wednesday, saying his father was sitting "for a deposition in front of the most corrupt Attorney General in the United States."

Donald Trump on Wednesday also posted video clips of James verbally attacking Trump, calling him an "illegitimate president" and vowing a lawsuit.

James's probe is one of several legal battles in which Trump is embroiled, threatening to complicate any bid for another run for the White House in 2024.

The deposition comes on the heels of a Federal Bureau of Investigation search on Trump's Florida residence in an escalation of legal probes into the 45th president that has set off a political firestorm.

The FBI, which is led by Christopher Wray, a Trump appointee, declined to provide a reason for the raid.

But US media outlets said agents were conducting a court-authorized search related to the potential mishandling of classified documents that had been sent to Mar-a-Lago after Trump left the White House in January 2021.

Trump predictably voiced outrage over the search, dubbing it "weaponization of the justice system."

At the White House, Press Secretary Karine Jean-Pierre said President Joe Biden did not have any advance notice about the raid and respected the independence of the Justice Department.

Since leaving office, Trump has remained the country's most divisive figure, continuing to sow falsehoods that he actually won the 2020 vote.

He also has faced intense legal scrutiny for his efforts to overturn the results of the 2020 election and over the January 6 attack on the US Capitol by his supporters.