Mr. Trump has repeatedly shifted his view of the election system. As a candidate, he frequently railed against what he called a “rigged” election. When he became president-elect, he complained about “serious voter fraud,” but later reversed himself and mocked Ms. Stein’s recount efforts as “a scam” and a waste of time and money.

This week, he flip-flopped again, telling lawmakers at a White House reception that Hillary Clinton won the popular vote because millions of immigrants in the country illegally voted for her. Mr. Spicer declined to elaborate on what Mr. Trump meant but did not back away from the assertion.

“The president does believe that,” Mr. Spicer said. “It’s a belief that he’s maintained for a while, a concern that he has about voter fraud. And that’s based on information that’s provided.”

It remains unclear what form a federal investigation may take. While the F.B.I. has the authority to look into voter fraud, that appears not to be what the president has in mind. Mr. Spicer said it was too early to know, but mentioned the possibility of a task force or commission.

He cited studies that he said showed that voter rolls contained the names of millions of people who should not be there because they had moved, were not citizens or had since died. But the author of one of those major studies said Wednesday that Mr. Spicer and the president appeared to be misunderstanding the numbers.

David Becker, who for six years was in charge of the election initiative for the Pew Center on the States, said that voter rolls often had out-of-date information, but that there was virtually no evidence that many of those names were used to vote illegally.

“It does exist, but it happens in very, very small numbers and nothing like what is claimed by the president,” Mr. Becker said. He said systems across the country to prevent voter fraud would have caught any huge effort to vote illegally. “We would have seen that well before the election,” he said. “We would have seen a swelling of the voter rolls and records.”