President Donald Trump warned in a tweet Thursday amid the Ukraine whistleblower inquiry that the stock market would melt down if Congress successfully impeached him.

"If they actually did this the markets would crash. Do you think it was luck that got us to the best Stock Market and Economy in our history. It wasn't," the tweet said.

Tweet

Trump's tweet came a day after the release of a rough summary of a July 25 phone call with Ukrainian President Volodymyr Zelensky. The summary showed Trump asked Zelensky to "look into" former Vice President Joe Biden and his son Hunter.

The tweet preceded the release of a whistleblower complaint on Thursday that alleges Trump used the powers of the president's office to solicit interference from a foreign country ahead of next year's election. The complaint, along with the call, prompted an impeachment inquiry by the House of Representatives.

This is not the first time Trump has warned of a market shock if he were to be impeached. Last year amid the investigation into Russia meddling in the 2016 election, he told Fox News, "If I ever got impeached, I think the market would crash. I think everybody would be very poor."

"Without this thinking, you would see numbers that you wouldn't believe in reverse," Trump said at the time, pointing at his head. "I got rid of regulations. The tax cut was a tremendous thing."

Stocks fell Tuesday amid concern the impeachment inquiry would hamper the economy, but the decline was modest with the Dow falling 142 points. On Wednesday, stocks rallied despite the release of the summary of the July 25 phone call, after Trump said a trade deal with China could happen sooner than believed. Some traders suspected Trump was trying to boost the markets.

A few investors played down the risk of a crash. Josh Brown, CEO of Ritholtz Wealth Management and a CNBC contributor, said in a tweet that "Presidents don't deserve all the blame / credit they get for the economy / stock prices."

Tweet

Tweet

Subscribe to CNBC on YouTube.