This story has been updated.

Government watchdog groups on Thursday called for an investigation into whether President Trump’s campaign and a super PAC controlled by his new national security adviser conspired with an embattled political data firm to violate elections laws.

In complaints filed Thursday with the Justice Department, the watchdog groups allege that the firm, Cambridge Analytica, violated a law barring foreign nationals from participating in U.S. elections. And they accuse the Trump campaign and John Bolton Super PAC of knowing their actions were improper when they worked with the firm.

Cambridge Analytica is already at the center of a federal investigation into Facebook’s protection of users’ private data, which Cambridge Analytica may have improperly used to develop voter profiles for political campaigns.

In a statement, Garrett Marquis, Bolton’s spokesman, said that the super PAC only recently learned of the allegations against Cambridge Analytica and that its agreement with the firm said the firm’s methods complied with the law.

“No individuals at Cambridge Analytica, foreign or otherwise, made any strategic decision regarding election-related activities,” he added. “Furthermore, John Bolton Super PAC hasn’t worked with Cambridge Analytica on any independent-expenditure effort since 2016, and the John Bolton Super PAC no longer uses any of the data provided by Cambridge Analytica.”

After The Post’s story was published, Marquis provided a statement directly responding to the allegations, calling them “frivolous.”

He said the super PAC “did not discuss any election-related, or any other topics, with the individuals named in the complaint” and “did not receive any strategic information” about campaigning from Cambridge Analytica employees.

Neither the Trump campaign nor Stephen K. Bannon — Trump’s former campaign chief executive and former vice president of Cambridge Analytica, who also was named in the complaints — responded to requests for comment.

A Trump campaign official previously told The Washington Post that the Cambridge team was managed by a U.S. citizen to ensure compliance. Federal election law says foreign nationals cannot “directly or indirectly participate in the ­decision-making process” of a political campaign, but they can play lesser roles.

A spinoff of a British company, Cambridge Analytica assigned dozens of non-U.S. citizens to provide campaign strategy and messaging advice to John Bolton Super PAC, and Republican candidates in the 2014 midterms, according to former employees. The firm advised the Trump campaign in the 2016 cycle.

In their complaint, Democracy 21 and Citizens for Responsibility and Ethics in Washington also named SCL Elections, a company affiliated with Cambridge Analytica. The complaint raises questions that may become relevant to Bolton’s role as national security adviser and the security clearance he may receive in the role, said Fred Wertheimer, president of Democracy 21, said in an interview.

“It’s reasonable to question whether the Bolton super PAC was aware of the misconduct or not,” said Norm Eisen, an ethics czar in the Obama White House and board chair of CREW, in interview. “And the evidence of misconduct is so profound that we believe that the Justice Department has no choice but to open an inquiry into the matter.”

In a separate complaint filed Monday with the Justice Department and the Federal Election Commission, the good-government group Common Cause claimed that Cambridge Analytica, its employees and its parent group in 2014 and 2016 violated federal law on foreign nationals’ participation in U.S. election-related activities.

Cambridge Analytica’s leadership, including Bannon, was notified of federal restrictions in a July 2014 memo from an attorney, according to documents obtained by The Post.

Former employee Christopher Wylie previously told The Post that he was a part of multiple conference calls with Bannon and Alexander Nix, the now-suspended chief executive of Cambridge Analytica, in 2014 in which strategic campaign matters were discussed.

In August 2014, Cambridge Analytica and SCL Elections signed a contract with the super PAC led by Bolton to support Republican Senate candidates in Arkansas, North Carolina and New Hampshire and to raise the issue of national security.

The two firms worked with the super PAC’s staff “to craft and deploy a communications programme in the target states,” according to the contract. The super PAC “made use of significant input from SCL on messaging and target audiences, with positive results,” according to a memo obtained by The Post.

SCL Elections deployed an operative on the ground to help the super PAC track and modify advertising for targeted groups, documents show.