Sept. 12 (UPI) — President Donald Trump signed an executive order Wednesday to give federal agencies power to sanction countries, foreign individuals and companies that interfere or spread misinformation in U.S. elections.

The executive action came less than two months before the Nov. 6 midterm elections, and two years after U.S. authorities say Russia meddled in the presidential race won by Trump.

“The president has said repeatedly that he’s determined that there not be foreign interference in our election,” national security adviser John Bolton said in a press call Wednesday. “We want to ensure the American public that elections have not been manipulated, their vote has not been changed. We have a process in place to ensure that and retaliate if necessary.”

During the briefing, Bolton was asked why Trump opted for an executive order instead of working with Congress.

“You never know how long legislation is going to take,” he answered.

Election interference includes spreading propaganda, hacking political campaigns and breaching voter registration databases.

Sanctions will be calibrated based on the seriousness of the interference, Bolton said. Punishments could include blocking transactions, limiting license exports, limiting access to U.S. financial institutions and barring U.S. citizens from investing in companies from violating countries.

Director of National Intelligence Dan Coats said this will be a 24-hour-a-day effort until election day.

“It’s more than Russia that we’re monitoring here,” Coats said. “We haven’t seen the intensity of what happened in 2016. It’s only a keyboard click away. We are taking nothing for granted here. We have seen signs … capabilities from Iran and even North Korea.”

Bolton said under the order, the intelligence community would have 45 days to determine whether there was meddling in the election. Its findings would then be turned over to U.S. Attorney General Jeff Sessions and Department of Homeland Security, which would have another 45 days to determine what action to take.

“If we see something, there’s going to be an automatic response to that,” Coats said.

The U.S. intelligence community concluded last year that “bots” and phony social media accounts spread propaganda and sensational stories to influence the 2016 campaign. Last week, executives from Facebook and Twitter testified before the Senate intelligence committee about Russian interference.

The executives emphasized the importance of notifying the public of suspect accounts and foreign influence.

“The threat we face requires extensive partnership and collaboration with our government partners and industry peers,” Twitter CEO Jack Dorsey said in prepared remarks. “We each possess information the other does not have, and the combined information is more powerful in combating these threats.”

Special Counsel Robert Mueller is investigating to determine whether there was collusion between Moscow and the Trump campaign before the 2016 vote. Former President Barack Obama sanctioned Russia’s main intelligence apparatus in December 2016 for interfering in the vote.