2020 presidential candidate Julián Castro (D.) has one of the most liberal platforms in the field on immigration, but in 2013 he strongly backed Obama-era immigration policies and said the notion of "open borders" was too extreme to consider.

Castro, the former Obama Housing and Urban Development chief, has set a far-left marker for the 2020 primary candidates on immigration. He has called for decriminalization of illegal border crossings, taking down some sections of existing border barriers, and providing free health care to illegal immigrants, the Texas Tribune reported.

Castro attacked other candidates in the field as insufficiently progressive on the issue, including former Vice President Joe Biden at last week's debate, when left-wing journalist Jorge Ramos challenged Biden on the Obama administration's deportation of three million illegal immigrants.

Castro, who drew criticism for attacking Biden's memory in the same debate, accused Biden of being unwilling to take responsibility for the deportation policies despised by liberals.

But as mayor of San Antonio, Castro lauded the Obama administration's "enforcement" of immigration law during questioning by House Judiciary Committee chairman Bob Goodlatte (R., Va.) on Feb. 5, 2013.

"Do you think that interior enforcement should play a role to discourage future immigration by those not documented by making jobs to them unavailable? Should that be a part of that comprehensive immigration reform?" Goodlatte asked.

"That's a great question," Castro said. "I do believe that enforcement, both in terms of active enforcement on our borders—and under this administration there has been tremendous progress with regard to enforcement. In fact, the triggers in the 2007 proposal have just about all been met. But going forward, of course, enforcement is part of the conversation."

"Both in terms of border security and interior security, comprehensive immigration reform gives us the opportunity to make this work better at every single juncture," he added later.

"Are there options that we should consider between the extremes of mass deportation and a pathway to citizenship for those not lawfully present in the United States?" Goodlatte asked.

"Well, let me say that I do believe that a pathway to citizenship should be the option that the Congress selects," Castro said. "I don’t see that as an extreme option. In fact, as one of the representatives pointed out, if we look at our history, generally what we found is that Congress over time has chosen that option, that path to citizenship. I would disagree with the characterization of that as the extreme. The extreme, I would say, just to fill that out, would be open borders. Nobody agrees with open borders. Everyone agrees that we need to secure our border."

Castro now refers to the idea of "open borders" as a "right-wing talking point," but former Obama Homeland Security chief Jeh Johnson used that phrase in June to describe Castro's position on decriminalizing illegal border crossings.

"That is tantamount to declaring publicly that we have open borders," Johnson said. "That is unworkable, unwise and does not have the support of a majority of American people or the Congress, and if we had such a policy, instead of 100,000 apprehensions a month, it will be multiples of that."

Castro spokesman Sawyer Hackett told the Texas Tribune Castro was not demonstrating support for all of Obama's policies during his testimony in 2013.

"He was applauding the administration’s effort to prioritize immigration enforcement, not their efforts to deport mass numbers of immigrants," Hackett said.

Castro resigned the mayoralty in 2014 upon joining the Obama administration at HUD. He is considered a long shot for the Democratic nomination, but leading candidates Sen. Elizabeth Warren (D., Mass.) and Sen. Bernie Sanders (I., Vt.) share his position on decriminalization of illegal border crossings.