US President Donald Trump defended his trade war with China in remarks to reporters at the White House on Tuesday.

"Whether it's good or bad, the short term is irrelevant," Trump said after being questioned about the prospect of a recession. "We have to solve the problem with China because they're taking out $500 billion a year plus."

Many economists are warning that a recession may be on its way and have put some of the blame on the trade war.

Trump and his aides are said to be concerned that a recession could seriously dent his chances of reelection in 2020.

Visit Business Insider's homepage for more stories.

President Donald Trump on Tuesday described the prospect of the US falling into recession as "irrelevant" and defended his decision to wage a trade war with China.

During a White House visit by Romanian President Klaus Iohannis, Trump was asked about concerns that his trade war with China was dragging down the US economy.

"Somebody had to take China on," Trump replied. "And it's about time, whether it's good for our country, or bad for our country short term.

"Long term, it's imperative that somebody does this because our country cannot continue to pay China $500 billion because stupid people are running it.

"I don't mind this question. Whether it's good or bad, the short term is irrelevant. We have to solve the problem with China because they're taking out $500 billion a year plus. And that doesn't include intellectual-property theft and other things."

Read more: Trump is reportedly so worried about the threat of recession he's considering reversing some of his signature China tariffs

Reframing the reporter's question, he continued: "And also, national security. So I am doing this whether it's good or bad for your statement about, 'OK, will we fall into a recession for two months?'

"The fact is, somebody had to take China on. My life would be a lot easier if I didn't take China on. But I like doing it because I have to do it."

The president's apparent acceptance that his policies could cause the US economic pain marks a sharp departure from his remarks in recent days, in which he has boasted of the strength of the US economy and accused the media and political opponents of skewing economic data as precipitating a recession to help torpedo his chances of reelection in 2020.

Read more: Trump is convinced there is a conspiracy to distort economic data and exaggerate the prospect of a recession

Trump's remarks were echoed by his acting chief of staff, Mick Mulvaney. In remarks to GOP donors at an event in Washington on Tuesday, Mulvaney said that if the US were to face a recession, it would be "moderate and short," Politico reported.

Mick Mulvaney, Trump's acting chief of staff. Cheriss May/NurPhoto via Getty Images

White House officials had previously insisted that perceived recession indicators were being exaggerated and that the prospects for the economy remained good.

On Tuesday, Trump said that he did not think a recession was on its way but acknowledged that payroll tax cuts were among measures being considered should the US economic situation worsen.

"We're very far from a recession," Trump said. "In fact, if the Fed would do its job, I think we'd have a tremendous spurt of growth, a tremendous spurt."

Read more: One of Trump's top advisers claimed the yield curve has signaled 'a very strong Trump economy.' But he said the exact opposite in his book in 2006.

A rare inverted yield curve, in which long-term borrowing rates become cheaper than short-term rates, occurred in bond markets last week. An inverted yield curve has in the past indicated that a recession or economic downturn is on its way.

Some economists have pointed to Trump's trade war with China as among the factors responsible for the economic instability, placing pressure on him to reach a trade deal with Beijing.

But the president's confrontational stance with China was, according to analysts, among the reasons he was able to clinch victory in Rust Belt swing states in 2016 and win the presidency.