WASHINGTON — Homeland Security Secretary John Kelly told Hispanic lawmakers on Wednesday that a program that protects young immigrants from deportation is likely illegal, though he is personally supportive, according to House members.

Kelly attended a meeting with members of the Congressional Hispanic Caucus, who pressed him on former President Barack Obama’s Deferred Action for Childhood Arrivals program. DACA gives hundreds of thousands of young people brought into the country as children protection from deportation and a work permit.

A group of attorneys general has called on the Trump administration to phase out the program. Texas Attorney General Ken Paxton and others have threatened to amend a district court case to challenge the DACA program unless the Trump administration acts to phase it out.

Members of the Congressional Hispanic Caucus pushed Kelly for an update on whether the administration would defend the program. They said they left concerned.

“He’s personally for it. He thinks it will not hold up, according to the attorneys he’s spoken with,” said Rep. Joaquin Castro, D-Texas. “He was challenged by those of us in the room ... to publicly announce his own position and to be a leader and to stand up and defend DACA. He said he would consider it.”

President Donald Trump pledged as a candidate to “immediately end” the DACA program. But as president, he has said that class of immigrants will not be targets for deportation.

Homeland Security spokesman Dave Lapan confirmed that Kelly has doubts about the program’s legal viability, based on conversations he has had with attorneys.

Lawmakers at the meeting are pushing for passage of a bill that would allow hundreds of thousands of young immigrants to remain eligible for a work permit without fear of deportation. They challenged Kelly to attend a press conference on Capitol Hill in support of the bill.

“Here’s what he did say to us: ‘I’ve been fighting for DACA, and basically the reason we’re in July and nothing has gone awry with DACA is because of my presence as secretary of Homeland Security,’ ” said Rep. Luis Gutierrez, D-Ill.