Sean Spicer. Kevin Lamarque/Reuters A Fox News reporter confronted the White House press secretary on Wednesday over President Donald Trump's announcement that there would be a "major investigation" based on his unsubstantiated claim that millions of ballots were cast illegally in the 2016 election.

The reporter, John Roberts, noted that Trump's attorneys wrote late last year in court filings submitted to squash recount efforts by Green Party presidential nominee Jill Stein in Michigan and Pennsylvania that no evidence pointed to voter fraud existing in the election.

"On what basis does Stein seek to disenfranchise Michigan citizens?" the attorneys wrote on behalf of Trump's campaign in the Michigan filing. "None really, save for speculation. All available evidence suggests that the 2016 general election was not tainted by fraud or mistake."

Roberts asked how those statements could square with an investigation.

"Attorneys who were representing the president-elect during the recounts in several states emphatically stated 'all available evidence suggests that the 2016 general election was not tainted by fraud or mistake,' so how do you square those two things?" he asked.

Spicer suggested the lawyers' statement wasn't referring to "states we didn't compete in."

"Well, I think there were a lot of states we didn't compete in where that is not necessarily the case," he said. "You look at California and New York, I'm not sure that those statements were — we didn't look at those two states in particular."

Spicer said the investigation would look into "bigger states," adding that details would be released later this week.

"I think in terms of registration ... you've got folks on rolls that have been deceased or have moved or are registered in two counties," he said. "This isn't just about the 2016 election — this is about the integrity of our voting system."

Trump secured the presidency in the November 8 election with more than 300 electoral votes. Democratic presidential nominee Hillary Clinton, however, won the popular vote by nearly 3 million votes.

In late November, Trump first made the baseless claim that "millions" had voted illegally in the election and had swung the popular vote in Clinton's favor. He also claimed without evidence that "serious voter fraud" occurred in Virginia, New Hampshire, and California — all states that he lost. The secretaries of state in each of those three states strongly rebuked Trump's assertion and said no such fraud took place.

Trump's false assertions were brought back to the forefront this week when he made a similar claim during a meeting on Monday evening with congressional leaders, much to the dismay of several Republicans. Trump's claims that voter fraud affected the election have repeatedly been shot down by fact-checkers and voting officials.

Reporters had also grilled Spicer on Tuesday about Trump's claims, and Spicer said the voter-fraud claim was "a longstanding belief [Trump has] maintained." Spicer added that the "belief" was based on studies and evidence Trump had been presented. Spicer said the president believed that as many as 3 million to 5 million people voted illegally in November's election.

A study cited by Spicer and another cited by Trump during the campaign did not prove Trump's assertions. Authors of both studies have said they did not prove Trump's assertions.

Spicer did not answer on Tuesday whether he personally believed millions voted illegally.

On Wednesday morning, Trump announced his intention to start an investigation.

"I will be asking for a major investigation into VOTER FRAUD, including those registered to vote in two states, those who are illegal and," he said in a tweet, adding in a subsequent one, "even those registered to vote who are dead (and many for a long time). Depending on results, we will strengthen up voting procedures!"

Watch the exchange: