Fifteen states and the District of Columbia filed a lawsuit Wednesday over President Trump's plan to end a program protecting young immigrants who came to the U.S. as children from deportation.

Washington Attorney General Bob Ferguson, a Democrat who earlier this year sued Mr. Trump over a travel ban affecting mostly Muslim nations, announced the suit at a news conference Wednesday. By the time it was filed, 15 states and D.C. had signed onto the suit. On Tuesday, U.S. Attorney General Jeff Sessions said the program, known as the Deferred Action for Childhood Arrivals or DACA, will end in six months to give Congress time to find a legislative solution for the immigrants. The participants were brought to the U.S. illegally as children or came with families who overstayed visas. The decision affects roughly 800,000 such "Dreamers," as they are called.

The lawsuit was filed in the Eastern District of New York, and the plaintiffs were New York, Massachusetts, Washington, Connecticut, Delaware, District of Columbia, Hawaii, Illinois, Iowa, New Mexico, North Carolina, Oregon, Pennsylvania, Rhode Island, Vermont and Virginia. The complaint claims the president's decision racially discriminates against "Dreamers," the majority of whom are Mexican, citing Fifth Amendment equal protection and due process grounds. The complaint also argues the government and Mr. Trump backtracked on assurances to protect such young immigrants and violated other federal laws about rule-making processes.

Get Breaking News Delivered to Your Inbox

"Despite its repeated assurances, the federal government announced that the DACA program will be rescinded and that the government will immediately cease accepting applications under DACA," the complaint reads.

DOJ spokesman Devin O'Malley said the DOJ looks forward to defending the administration's stance.

"As the attorney general said yesterday: 'No greater good can be done for the overall health and well-being of our republic, than preserving and strengthening the impartial rule of law,'" O'Malley said. "While the plaintiffs in today's lawsuits may believe that an arbitrary circumvention of Congress is lawful, the Department of Justice looks forward to defending this administration's position."

Those already enrolled in DACA remain covered until their permits expire. If their permits expire before March, 5, 2018, they are eligible to renew them for another two years as long as they apply by Oct. 5. But the program isn't accepting new applications.

On Tuesday night, the president tweeted that he would revisit the issue of DACA if Congress hasn't devised a legislative solution in the next six months. Mr. Trump didn't clarify what he meant by revisiting the issue on Wednesday, but said he is confident Congress will fix the problem.

"Congress, I really believe, wants to take care of this situation," Mr. Trump said aboard Air Force One on his way to North Dakota Wednesday.

"I really believe it — even very conservative members of Congress. I've seen it firsthand. If they don't, we're going to see what we're going to do. But I will tell you, I really believe Congress wants to take care of it. We discussed that also today, and Chuck and Nancy would like to see something happen, and so do I. And I said if we can get something to happen, we're going to sign it and we're going to make a lot of happy people."

On the campaign trail, Mr. Trump pledged to eliminate the program. But after his inauguration, Mr. Trump said DACA recipients didn't need to worry, and he would treat them with "heart."

Even after announcing the program's end, the president insisted he has "great heart" for those who came to the U.S. as children.

"I have a great heart for the folks we're talking about, a great love for them," Mr. Trump said during a meeting on tax legislation, adding, "People think in terms of children, but they're really young adults."

"I have a love for these people and hopefully, now Congress will be able to help them and do it properly," the president added.

CBS News' Paula Reid contributed to this report.