President Donald Trump, right, shakes hands with Army Lt. Gen. H.R. McMaster, left, at Trump's Mar-a-Lago estate. AP

President Trump's reelection campaign pulled an advertisement it had been airing to highlight the president's accomplishments in his first 100 days in office, The Daily Beast reported Monday.

The ad featured a series of images and text that flashed on-screen while a narrator noted what Trump has said are his biggest achievements so far — propping up military spending, nominating Neil Gorsuch to the Supreme Court, introducing a plan to overhaul the tax code, and getting rid of what he's called "job-crushing" regulations.

But the ad may have violated federal law by including an image of the president shaking hands with national security adviser H.R. McMaster after McMaster accepted his new role.

The Defense Department's rules state that active-duty military members are prohibited from taking part in political advertising or campaigning while in uniform. The Pentagon also said in 2005 that military personnel were barred from wearing their uniforms "during or in connection with furthering political activities ... when an inference of official sponsorship for the activity ... may be drawn."

McMaster, who is an active-duty member, was wearing his uniform in the image featured in Trump's 100 days ad.

"Use of LTG McMaster in Trump campaign ad seems to violate intent of military policy against members engaging in partisan political activity," tweeted Larry Noble, who is the former general counsel for the Federal Election Commission.

The Daily Beast noted that the Trump campaign had removed the original version of the ad and replaced it with a new version that did not feature McMaster in uniform.