Mario Draghi, head of the European Central Bank, had some stern words for President Donald Trump just hours after the U.S. commander in chief accused him of unfairly targeting the euro's exchange rate.

"We have our remit, we have our mandate," Draghi told an audience at the ECB's annual forum in Sintra, Portugal, on Tuesday.

"Our mandate is price stability defined as a rate of inflation which is close to but below 2% over the medium term."

He iterated that the euro zone's central bank is "ready to use all the instruments that are necessary to fulfill this mandate." "And we don't target the exchange rate," he said to applause from the crowd.

Trump went after Draghi early Tuesday for opening the door to more monetary stimulus in Europe, which would likely weaken the common currency against the greenback.

"They have been getting away with this for years, along with China and others," Trump said in a tweet, noting a weaker euro would make it "unfairly easier for them to compete against the USA."

Trump later also highlighted gains in the German DAX stock market, attributing the move to Draghi's comments. "Very unfair to the United States," he said.