Former Vice President Joe Biden, while a senator in 2006, advocated 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.

"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.

OCASIO-CORTEZ ASSAILS BIDEN'S 'MIDDLE GROUND' CLIMATE CHANGE PLAN, SAYS IT'S A 'DEALBREAKER'

The video came as Biden entered the race to be his party's challenger against President Donald Trump during the 2020 elections. One of the top criticisms from Democrats has surrounded Trump's tough immigration stances and, in particular, his demand for a barrier across the southern border.

Biden, in the video, indicated he was more concerned about drugs than he was about immigrants themselves crossing the border.

"Now, I know I'm not supposed to say it that bluntly, but they're the facts, they're the facts. And so everything else we do is in between here. Everything else we do is at the margins. And the reason why I add that parenthetically, why I believe the fence is needed does not have anything to do with immigration as much as drugs," he told the audience.

It's unclear what Biden's thoughts on the wall are now that it's become a central platform of the Trump agenda. Biden, perceived as more of a moderate Democrat, has pushed for tougher security through enhanced technological capabilities as an alternative to barriers.

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.

"He believes that we can secure our borders without abandoning our values, and that we should do that by addressing the root causes of immigration abroad and working toward comprehensive immigration reform at home, including a pathway to citizenship for undocumented immigrants and smart border security.

"He also believes that the Trump Administration's approach to immigration, including its crackdown on sanctuary cities and especially its repugnant treatment of migrant children, is contrary to our values as a nation."

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

The immigrations section of Biden's campaign website similarly calls for a "humane" immigration system but doesn't specifically declare support for or against a border barrier.

The wall has become a sticking point in negotiations over immigration reform between Congress and the White House. The concept of a wall has received a lot of criticism from Democrats like House Speaker Nancy Pelosi, D-Calif., went so far as to call it "immoral."

CLICK HERE TO GET THE FOX NEWS APP

Other Democrats like Senate Minority Leader Chuck Schumer, D-N.Y., have also come under scrutiny for supporting the border wall beforeTrump's presidency.

Biden could face criticism related to immigration as he competes against his more progressive opponents in the 2020 primaries. In most polling, he has dominated the competition, leading runner-up Sen. Bernie Sanders, I-Vt., with substantial margins.