President Trump said Monday he would donate $100,000 of his annual pay to the Department of Homeland Security, writing there would be "hell to pay" from reporters if he did not.

The department is charged with carrying out Trump's policies on immigration and border security, and the department's funding was central to a 35-day partial government shutdown that ended in January. During the shutdown, agency employees weren't paid on time as Trump sought to convince Congress to provide billions of dollars in funds for a border wall along the U.S.-Mexico border.

"While the press doesn’t like writing about it, nor do I need them to, I donate my yearly Presidential salary of $400,000.00 to different agencies throughout the year, this to Homeland Security," Trump wrote on Twitter.

He added: "If I didn’t do it there would be hell to pay from the FAKE NEWS MEDIA!"

While the press doesn’t like writing about it, nor do I need them to, I donate my yearly Presidential salary of $400,000.00 to different agencies throughout the year, this to Homeland Security. If I didn’t do it there would be hell to pay from the FAKE NEWS MEDIA! pic.twitter.com/xqIGUOwh4x — Donald J. Trump (@realDonaldTrump) March 18, 2019

It was unclear if Trump meant that journalists would criticize him if he donated to an entity other than DHS, or if he was complaining that the media would criticize him if he reneged on a campaign vow not to accept his $400,000 annual presidential salary.

In January, Trump donated his $100,000 paycheck for the third quarter of 2018 to researching alcoholism, from which his brother suffered.

Previous checks were given to the Department of Veterans Affairs, the Small Business Administration, the Transportation Department, the National Park Service, the Department of Education, and federal anti-opioid abuse efforts.