Washington(CNN) President Donald Trump dissolved his much-touted voter fraud commission on Wednesday, attributing the step to various states' refusal to participate in the board, which was criticized as a misguided step to solve a practically non-existent problem.

"Many mostly Democrat States refused to hand over data from the 2016 Election to the Commission On Voter Fraud. They fought hard that the Commission not see their records or methods because they know that many people are voting illegally. System is rigged, must go to Voter I.D.," Trump said in a Thursday morning tweet.

In the wake of the announcement, advisers outlined hesitation from within the White House for months about the commission.

"It's a s--t show," said one White House adviser to CNN, adding that the commission went "off the rails."

Trump established the commission in May after claiming without evidence that massive voter fraud had cost him the popular vote, and he appointed Vice President Mike Pence and Kansas Secretary of State Kris Kobach to lead the panel.

But after months went by and the commission faced pushback from officials across the country, civil rights advocates and even a member of the commission itself -- as well as an unclear mandate, according to the White House official -- Trump pulled the plug Wednesday.

In a statement, the White House said dissolving the commission would avoid "endless legal battles at taxpayer expense," adding that Trump has asked the Department of Homeland Security to determine future action.

Another White House official familiar with the matter said the commission was unable to operate as structured under the Federal Advisory Committee Act. That law mandates a degree of transparency around commission activities and was the subject of litigation against it.

The White House says the Department of Homeland Security will take up the issue, and a spokesman for the department said its focus was on election security.

"At the President's direction, the Department continues to work in support of state governments who are responsible for administering elections, with efforts focused on securing elections against those who seek to undermine the election system or its integrity," DHS spokesman Tyler Houlton told CNN.

Houlton added that "Mr. Kobach is not advising the Department on this matter."

That contradicts Kobach, who told The New York Times he would be an informal adviser to the department.

A controversial task from the start

The commission has been beset by controversy virtually since it began.

Critics contended Trump was simply finding a way to account for his popular vote loss in the 2016 presidential election, and one White House adviser expressed a belief that Trump simply wanted the commission to deliver a report saying voter fraud is a problem and to offer some directives to address it.

Another senior White House official acknowledged bringing on Kobach was controversial.

"He's a lightning rod," the official said.

A source close to Pence said chairing the commission "wasn't something that (Pence) asked for," but that the vice president has a "workman-like attitude" about these things, and so he took on the job.

The source said Trump wanted Kobach involved in the commission with the understanding that while Pence would share the chairing role with Kobach, it would be Kobach who would run the commission day-to-day.

Treat 'it like a book report'

The panel requested wide-reaching information about voters in every state, including dates of birth and partial Social Security numbers. The request was met with swift and strong opposition by many state election officials, setting off a series of lawsuits over privacy, and requests were eventually scaled back.

There was even concern among some in the White House that some of the requests from the commission, including asking for voter rolls, crossed legal boundaries and might not have been that well thought out before they were announced publicly.

The senior adviser lamented how far down the road the White House and Vice President's office had gotten with the commission.

"VP's team, though, should have seen that assignment as a s--t sandwich and treated it like a book report," the adviser said. "Avoid trouble, cite real instances of voter fraud, address structural and technology problems, make recommendations and move on."

A spokeswoman for Pence's office referred inquiries about the commission's dissolution to the White House statement.

RELATED: Trump election commission head lambasted for voter fraud claims

Statements stoking outrage

Shortly after his shocking win in the 2016 presidential election, Trump asserted via Twitter, without evidence, that he would have won the popular vote had millions not voted illegally.

"In addition to winning the Electoral College in a landslide, I won the popular vote if you deduct the millions of people who voted illegally," he said.

The President also named hard-liners to the panel who were known for their strong belief in widespread voter fraud, despite no research supporting the idea that fraudulent voting has been substantial in almost any election.

One of those members, the Heritage Foundation's Hans Von Spakovsky, had also sent an email to the Justice Department prior to his appointment urging the government to not include any Democrats on the panel. The email was later made public.

And last summer, commission vice chair Kobach declined to say if Clinton won the popular vote in 2016.

"We will probably never know the answer to that question," Kobach said on MSNBC. "Because even if you could prove that a certain number of votes were cast by ineligible voters, for example, you wouldn't know how they voted."

Kobach again faced heat from state officials for statements he made within New Hampshire about New Hampshire's election practices. Those statements were part of the commission's last formal public meeting and drew further outrage from Democrats.

Legal challenges

Eventually, one Democratic member of the commission went public with his complaints that the commission was not including its Democratic members and his concern that it existed to substantiate Trump's prior assertion, without evidence, that mass voter fraud took place in the 2016 election.

That Democratic member, Maine Secretary of State Matthew Dunlap, went to federal court to sue the commission and compel it to provide him with documents.

The US District Court in Washington sided with Dunlap in the lawsuit, which the commission's executive director, Andrew Kossack, previously said had "no merit," and ordered the commission to provide Dunlap with the information on commission activities and communications he requested.

On those recent headlines for the commission, the source close to the vice president admitted, "A member of the commission suing the commission is not ideal."

Groups opposed to the commission hailed the White House shuttering the group.

Lawyers' Committee for Civil Rights Under Law executive director Kristen Clarke told CNN it was important for advocates to remain vigilant and cited Trump's repeated revisions to the travel ban as an example.

"This administration has a track record of refurbishing and reissuing old discriminatory policies as we have seen with the Muslim Ban," Clarke said.

Dale Ho, the director of the ACLU's project on voting rights, said in a statement that the commission "was a sham from a start."

Likewise, Brennan Center for Justice president Michael Waldman said the commission "started as a tragedy and ended as a farce."