WASHINGTON — President Donald Trump has signed an executive order aimed at discouraging foreign countries and actors from tampering with U.S. elections, two top national security officials said in a conference call with reporters Wednesday.

The order creates a process by which the nation's intelligence agencies will assess whether foreigners have interfered with U.S. elections — including spreading propaganda and infiltrating campaign infrastructure — the Justice and Homeland Security departments will review their reports and the Treasury and State departments will recommend possible sanctions to the president, National Security Adviser John Bolton said.

The initial intelligence assessment is due no later than 45 days after an election, which could be an invitation for foreign actors to meddle, according to Brett Bruen, who was director of global engagement at the National Security Council under President Barack Obama.

"It gives a country like Russia the chance to both achieve its goals during the election and prepare for any penalty," Bruen said in a text exchange with NBC News.

But safeguarding American elections are a "high priority" for Trump, Bolton said.

The announcement comes nearly two years after the nation's intelligence agencies concluded that Russia interfered with the 2016 election to try to help Trump win, amid a special counsel probe into whether Trump's operation conspired with Russia to effect that outcome and less than two months before voters go to the polls to render their midterm judgment on Trump and the Republican-controlled Congress.

It also comes as Trump is facing pressure from Congress to support legislation that would create mandatory sanctions for foreign actors who intercede in American elections.

"There is no question that protecting our elections from foreign interference is one of the most pressing issues facing our country today," but the executive order "does not go far enough," Sens. Chris Van Hollen, D-Md., and Marco Rubio, R-Fla., the authors of a bill that would more expeditiously impose mandatory sanctions, said in a joint statement.

"The new E.O. would establish a process to identify and sanction Russian actors that interfere in U.S. elections, but can only be one part of a broader strategy to hold Russia accountable," said David Mortlock, who worked on sanctions policy as director for international economic affairs at the National Security Council under Obama. "The threat of sanctions alone may have little impact on Russia’s calculus if not accompanied by a clear message from the president to Vladimir Putin."

Regardless of which president is in power, it is common for Congress and the White House to fight over whether the president should have discretion in imposing international sanctions or whether they should be triggered automatically by law. Most sanctions laws include a waiver by which the president can cite national security reasons to refrain from punishing foreign actors who would otherwise be sanctioned.

Director of National Intelligence Dan Coats said the 2016 election was a warning signal for the U.S. but that the focus is on the midterms, the 2020 election and beyond.

Bolton added that sanctions could apply to attempts to interfere in elections, even if they do not ultimately affect the outcome.

Trump himself has vacillated on the question of whether Russia tampered with the 2016 election.

"I don’t believe they interfered," he told Time Magazine shortly after he won.

But he later tweeted "I never said Russia did not meddle in the election, I said 'it may be Russia, or China or another country or group, or it may be a 400 pound genius sitting in bed and playing with his computer.'"

The executive order on sanctions, the text of which was not immediately available, is not specific to any country, but U.S. officials have seen signs that China, Iran and North Korea, in addition to Russia, could be capable of interfering, Coats said.