(CNN) Joe Biden once spoke about jailing employers who hire "illegals," said sanctuary cities shouldn't be allowed to violate federal law, and argued a fence was needed stop "tons" of drugs coming into the country from "corrupt Mexico."

Then-Sen. Biden's past comments, which he made in the run-up to and during the 2008 presidential race, show an approach to the issue of immigration that could run afoul of the party's more liberal wing as Biden seeks the Democratic nomination to take on President Donald Trump in 2020. It also shows how Biden's long record in government can at times provide a contrast to where the Democratic Party has evolved in recent years.

Speaking to a South Carolina rotary club in November 2006, Biden touted his support for the Secure Fence Act -- a bill that authorized 700 miles of double-layered fence on the border through more than a billion dollars in appropriations. The bill was also supported by then-Sens. Barack Obama and Hillary Clinton. CNN's KFile reviewed the video, which had been posted on YouTube at the time.

"Folks, I voted for a fence, I voted, unlike most Democrats -- and some of you won't like it -- I voted for 700 miles of fence," Biden told the group . "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."

"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," Biden continued. "And let me tell you something folks, people are driving across that border with tons, tons, hear me, tons of everything from byproducts for methamphetamine to cocaine to heroin and it's all coming up through corrupt Mexico."

Read More