President Trump defended his national security adviser, H.R. McMaster, at the end of a week in which far-right news sites and pundits called for his dismissal and accused him of undermining the president's agenda.

"General McMaster and I are working very well together," Trump said Friday night in a statement emailed to the New York Times. "He is a good man and very pro-Israel. I am grateful for the work he continues to do serving our country."

Steve Bannon, Trump's chief strategist, and his populist allies, including Breitbart, the news site he used to run, have tussled with McMaster over his leadership of the National Security Council. Bannon has fought with McMaster on issues including strategy for the war in Afghanistan.

Politico reported that at a July meeting on the subject, McMaster, pushing for additional troops in Afghanistan, and Bannon, angling for less involvement in the war, "sparred openly." The Times reported this week that Trump had informally mulled sending McMaster to Afghanistan to command U.S. forces there, replacing him as national security adviser with Mike Pompeo, the CIA director.

McMaster has also cautioned Trump against canceling the nuclear agreement with Iran, which was negotiated by the Obama administration.

John Kelly, Trump's new chief of staff and a retired Marine general, has reportedly advocated for McMaster, a fellow general.

After Kelly began his job Monday, McMaster asserted his leadership, ousting Ezra Cohen-Watnick, the senior director for intelligence programs at the National Security Council, and the latest ally of former national security adviser Michael Flynn to be dismissed from the White House.

McMaster reportedly tried to fire Cohen-Watnick in March, but Bannon and Jared Kushner, the president's son-in-law and senior adviser, pushed Trump to intervene and save him.

In April, after McMaster's arrival, Bannon was removed from the NSC's principles committee.

Since Cohen-Watnick's exit, populist forces have escalated their attacks on McMaster. Those attacks continued after a report Thursday revealed McMaster renewed the security clearance of Susan Rice, former President Barack Obama's national security adviser. Such a renewal is considered standard practice for former officials of Rice's stature.

Frank Gaffney Jr., president of the Center for Security Policy, said on a radio show on Friday that McMaster was "insubordinate to his commander in chief."

Breitbart News posted stories this week asserting McMaster is hostile to Israel.

According to the Times, the hashtag #FireMcMaster was tweeted more than 50,000 times since Wednesday. Accounts linked to Russia also promoted the idea of firing McMaster.

The Times said that the Alliance for Securing Democracy, a bipartisan group created to focus attention on Russian interference in the West, found that the top hashtag among 600 Twitter accounts linked to Russia at one point on Thursday was #FireMcMaster.

On Friday, Trump and his closest advisers tried to fight back at these attacks, siding with McMaster.

"General McMaster is a true public servant and a tremendous asset for the president and the administration," Kushner told the Times in an email. "He has created and oversees a very thorough and clear process for the agencies to work together to give the president credible options to advance the president's priorities for America's foreign policy."