Homeland Security Secretary John Kelly took the blame Tuesday for the hasty rollout of President Trump's order suspending immigration from seven countries, while defending the measure as "lawful and constitutional."

"It's all on me," Kelly told the GOP-led House Homeland Security Committee, acknowledging lawmakers were not fully apprised.

“I should have delayed it just a bit so I could have talked to members of Congress,” Kelly said. “Going forward, I would have certainly taken some time to inform Congress, and that’s something I look forward to in the future.”

Trump's Jan. 27 executive order suspended the U.S. refugee program and largley banned immigration and travel from seven mostly Muslim countries for 90 days. Kelly said Monday, as he said last week, that the order was crafted before he was confirmed as DHS secretary.

The order, which caused confusion for green-card holders and others before the administration made clear they would not be affected, has since been held up in federal court with a hearing set for late Tuesday in California.

Trump, ahead of a White House meeting with county sheriffs, voiced confidence Tuesday in his administration’s case.

“We have to have security in our country,” Trump said, adding that his team would take its case “through the system.” Asked if that means the dispute will land before the Supreme Court, he said: “We’ll see. Hopefully it doesn’t have to.”

Kelly also acknowledged before the GOP-led committee Tuesday that some of the order’s core tenants are problematic, but said “it’s still my belief we will prevail.”

“We believe [the order] is lawful and constitutional,” said Kelly, who also gave his support for Trump’s plan to build a wall along the U.S.-Mexico border.

Committee Chairman Mike McCaul opened the hearing, Kelly’s first as homeland secretary, by saying, “This country is eager to work with you. … Your job won’t be easy.”

The Texas Republican also said the rollout of the executive order has been “problematic.”

Mississippi Rep. Bennie Thompson, the top Democrat on the committee, acknowledged that Kelly was being called upon to explain and defend an order about which he had little prior knowledge.

“Frankly, it is somewhat unfair,” he said.

Kelly also said the administration has no plans to expand the number of countries on the banned list, dismissing reports that the number will increase to 12 and saying that officials hope, in fact, to narrow the list.

Kelly argued, as he did last week, that the ban was imposed in larger part because official records in the seven countries are too inadequate to prove that travelers “are who they say they are.” And he appeared to try to emphasize how little the United States knows about such countries and their people by pointing out the U.S. has no embassy in four of the seven countries.

He also said that Assistant to the President Steve Bannon, a member of the National Security Council, is not a Homeland Security Department employee, when asked by Rep. Cedric Richmond, D-La.

As for the proposed border barrier, Kelly said the U.S. already has about 650 miles of southern border wall and predicted the entire project will be complete in about two years.

He said he plans to visit the border on Thursday, while acknowledging that the southwest region continues to be a major problem.

Trump “hired me to get control of the southwest border, which I will do,” Kelly said.