WASHINGTON – President Donald Trump was singed on Twitter Wednesday when he appeared to misstate the date of the landmark nuclear agreement that Iran signed with the U.S. and five other countries.

In his address to the nation, Trump claimed that hostilities with Iran increased substantially “after the foolish Iran nuclear deal was signed in 2013.”

The final nuclear agreement was signed in 2015.

The White House said Trump was referring to an interim accord that was signed in 2013 and paved the way for the final agreement.

“2013 was when the initial agreement was signed that ultimately led to the final agreement in 2015,” White House spokesman Judd Deere said.

Read the transcript:'Iran will never be allowed to have a nuclear weapon.' Read Donald Trump's remarks on Iran

The interim agreement signed on Nov. 24, 2013 spelled out an approach for working toward a long-term comprehensive pact dealing with international concerns about Iran’s nuclear program.

On April 2, 2015, Iran and the other countries reached a framework for a long-term deal, which was finalized the following July.

Trump, who repeatedly criticized the deal as a candidate for president, announced in 2018 that the U.S. was pulling out of the long-term agreement.

But in previous speeches, he has usually cited the 2015 pact, not the 2013 interim deal.

In a speech to the United Nations in 2018, when arguing Iran’s neighbors paid a heavy toll for its aggression and expansion, Trump added: "That is why so many countries in the Middle East strongly supported my decision to withdraw the United States from the horrible 2015 Iran Nuclear Deal and re-impose nuclear sanctions."

When he announced the U.S. was withdrawing from the agreement, Trump said: “In 2015, the previous administration joined with other nations in a deal regarding Iran’s nuclear program."

Twitter took notice when he switched the dates in his speech on Wednesday.

Live: Trump warns Iran but says US 'ready to embrace peace with all who seek it'

Background:U.S. withdraws from Iran nuclear deal, a set-up for Trump's ultimate goal