In a previous bid for the presidency, then-Sen. Joe Biden's stance on illegal immigration sounded a lot like President Trump's current views, the hosts of "Fox & Friends" noted Tuesday.

Steve Doocy flagged a clip from a September 2007 presidential debate, when then-candidate Biden was asked if he would allow cities to ignore federal law.

Biden answered that so-called sanctuary cities ignore federal immigration law because they lack the funding to carry out enforcement.

"Part of the problem is you have to have a federal government that can enforce laws," he said, calling out the George W. Bush administration for being "fundamentally derelict" in providing the necessary funding.

LIMBAUGH SAYS DEMOCRATIC PRESIDENTIAL PRIMARY MAY BE OVER WITH BIDEN LEADING THE WAY

GILLIBRAND PINS BIDEN'S LARGE POLL LEAD ON NAME ID

The Delaware Democrat was then asked, "yes or no, would you allow those cities to ignore the federal law?"

"No," Biden responded.

The "Fox & Friends" hosts noted that "politics" and the current views of the crowded Democratic Party field have forced Biden to alter his rhetoric.

In a 2006 video that resurfaced last week, Biden is seen advocating for a southern border wall and punishment for employers who hired illegal immigrants.

Biden told a South Carolina rotary club that he voted for a border fence despite other Democrats opposing the measure.

CLICK HERE TO GET THE FOX NEWS APP

"Folks, I voted for a fence; I voted, and unlike most Democrats -- and some of you won't like it -- I voted for 700 miles of fence," he said, in the video unearthed by CNN.

"But, let me tell you, we can build a fence 40 stories high -- unless you change the dynamic in Mexico and -- and you will not like this, and -- punish American employers who knowingly violate the law when, in fact, they hire illegals. Unless you do those two things, all the rest is window dressing," he added.

BORDER PATROL OFFICIAL TO CONGRESS: 'WE CAN'T ARREST OUR WAY OUT OF THIS PROBLEM'

His spokesman reportedly indicated that his position hadn't changed but that a border wall wouldn't "address the real issues."

"As then-Senator Biden said at the time, 'we can build a fence 40 stories high,' but it will not address the real issues here. Vice President Biden believes we have to stop trying to scare people and instead have an immigration discussion based on facts," spokesman Andrew Bates said.

Fox News' Sam Dorman contributed to this report.