President Trump compared his record to that of former President Barack Obama while defending his new deal with Mexico to reduce illegal immigration, and in Trump’s opinion, it’s no contest.

“If President Obama made the deals that I have made, both at the Border and for the Economy, the Corrupt Media would be hailing them as Incredible, & a National Holiday would be immediately declared,” Trump tweeted Sunday. “With me, despite our record setting Economy and all that I have done, no credit!”

The comment came after Trump lashed out at the New York Times in a series of tweets for casting doubt on the breakthrough he claimed for his deal with Mexico to avoid tariffs and “stem the tide” of migrants on their way to the U.S. southern border. The Times disputed the credit he said he deserved, reporting that aspects of the agreement had already been agreed upon months before the president’s tariff threat.

The deal, the “U.S.-Mexico Joint Declaration,” which was released by the State Department after Trump’s announcement, outlined measures that would be taken by Mexico to reduce the surge of immigrants, mostly from Central America, passing through Mexico on their way to seek asylum in the U.S., including the “deployment of its National Guard throughout Mexico, giving priority to its southern border.”

“But the Mexican government had already pledged to do that in March during secret talks in Miami between Kirstjen Nielsen, then the secretary of homeland security, and Olga Sanchez, the Mexican secretary of the interior,” Times correspondents Michael D. Shear and Maggie Haberman wrote, pointing out that Mexico had already agreed to several other aspects of the deal months before Trump’s tariff threat. Read more

Read also: Trump wants to start charging stores to accept food stamps