Obama was talking about the Secure Fence Act of 2006, legislation authorizing a barrier along the southern border passed into law with the support of 26 Democratic senators including party leaders like Hillary Clinton, Joe Biden, and Chuck Schumer.

“The bill before us will certainly do some good,” Obama said on the Senate floor in October 2006. He praised the legislation, saying it would provide “better fences and better security along our borders” and would “help stem some of the tide of illegal immigration in this country.”

WASHINGTON — As a senator, Barack Obama once offered measured praise for the border control legislation that would become the basis for one of Donald Trump’s first acts as president.


Now it’s become the legal mechanism for Trump to order construction of a wall between the United States and Mexico, attempting to make good on a key promise from the campaign trail. Trump specifically cited the law in the first sentence of Wednesday’s executive order authorizing the wall.

The episode shows how concerns over border security occupied Washington well before Trump made it the centerpiece of his candidacy, and that Democrats were more than willing to offer big sums of taxpayer money to keep Mexicans and other Latino immigrants out of the United States. The border fence called for in the 2006 law was far less ambitious than the wall Trump envisions, and, as he is apt to do, he has made the issue bigger, more explosive, and far more disruptive to US diplomacy.

Trump has also added his own twist that was never a part of the 2006 legislation, a promise that the Mexican people would pay for the wall. But on Thursday White House spokesman Sean Spicer, in a briefing aboard Air Force One, said that Trump would levy a 20 percent tax on all imports from Mexico to fund construction of the barrier.


He estimated that the 20 percent tariff would bring in $10 billion a year and “easily pay for the wall.” Later, the White House appeared to back away from the idea of an import tax.

Even before the highly controversial proposed funding mechanism was made public Thursday afternoon, Mexican President Enrique Peña Nieto announced that he was canceling his planned trip to the United States next week, citing the new administration’s focus on the wall.

Mexico’s President Enrique Pena Nieto. Marco Ugarte/Associated Press

Former Mexican president Vicente Fox, who opposed the measure in 2006 when he was in office, had even harsher words for Trump. “Donald, don’t be self-indulgent,” he posted on his Twitter feed Thursday. “Mexico has spoken, we will never ever pay for the #[Expletive]Wall.”

For Democrats who generally support relaxed rules that offer a path to citizenship for immigrants, the 2006 law was seen as the better of two evils. The House had recently passed legislation immigration advocates viewed as draconian because it would make any undocumented immigrant a felon.

By comparison, the border fence didn’t seem so bad. Moreover, immigration reform advocates were beaten down after a wider overhaul had stalled.

“It didn’t have anywhere near the gravity of harm,” recalled Angela Kelley, who in 2006 was the legislative director for the National Immigration Forum. “It was hard to vote against it because who is going to vote against a secure fence? And it was benign compared with what was out there.”


The law flew through the Senate with a vote of 80 to 19. (One senator, Edward Kennedy of Massachusetts, was not present. John Kerry, the state’s other senator, voted against it.) In the House, the measure passed 283 to 138, with 64 Democrats supporting it. (The Massachusetts delegation was split.) From there it went to then-President George W. Bush, who signed it 12 days before the 2006 mid-term elections.

The number of illegal immigrants in the United States reached about 12 million in 2007, and has since dropped off.

The plan was not nearly as expansive as Trump’s promise for a wall along the entire border. It allowed for about 700 miles of fencing along certain stretches. Congress put aside $1.4 billion for the fence, but the whole cost, including maintenance, was pegged at $50 billion over 25 years, according to analyses at the time.

The government had constructed about 650 miles of fence by 2015, most of it after passage of the act, according to a report last year by the US Government Accountability Office.

In his 2006 floor speech, Obama nodded to the prevailing belief in Washington that the bill wasn’t going anywhere. “This bill, from my perspective, is an election-year, political solution,” he said. “It is great for sound bites and ad campaigns.”

Clinton also voted for the bill, though in a floor speech during the debate she completely ignored the fence issue and heaped praise on an amendment to it that would help New York farmers by expanding the number of visas allowed for agricultural workers.


During her recent failed presidential campaign, however, she referred to the vote.

“I voted numerous times when I was a senator to spend money to build a barrier to try to prevent illegal immigrants from coming in,” Clinton said at November 2015 town hall in New Hampshire, “and I do think that you have to control your borders.”

Immigration reform advocates who worked on the bill — and opposed it — remembered thinking the fence would never actually be built.

“There was a lot of analysis done that said you just can’t do it,” said Kelley, who worked on the bill and is now the Executive Director of Center for American Progress Action Fund. “It was more a political statement than a sound policy proposal.”

“A lot of people owned land [where the fence would go]. There were endangered squirrels. None of that was being dealt with. It really did feel like this was more of a slogan than a solution,” said Kelley.

Only one current Democratic leader voted against the bill: That’s Bernie Sanders, who was in the House of Representatives at the time. He didn’t make a statement about it one way or the other, and his spokesman, Michael Briggs, declined to comment Thursday.

Leading the opposition in the Senate was Kennedy, though he was not present for the final vote.

From the floor he bemoaned the death of a larger bipartisan overhaul to the immigration system and mocked the Republicans for coming up with legislation he felt would do little to fix the problem.


“Republican leaders wasted time, opportunity, and your money,” Kennedy said. “For a $9 billion fence that won’t do the job. That is just a bumper sticker solution for a complex problem. It’s a feel-good plan that will have little effect in the real world.”

But outside the halls of Congress, constituents took the legislation very seriously.

Republicans held a series of field hearings about the fence around the country, stirring up support for it.

Advocates jammed the phone lines, and even sent members of Congress bricks that were intended to symbolize the wall they wanted constructed on the southern border, according to a Washington Post story from the time.

They were led by a senator who did always argue for the wall: Jeff Sessions, whom Trump has selected to be the attorney general.

“We do not have operational control of the border,” Sessions said during the 2006 debate. “Fencing on the southern border is and should be a part of our plan to recapture a legal system of immigration in America. It remains one of our important priorities.”

President Donald Trump sat his desk on Air Force One upon his arrival at Andrews Air Force Base Thursday. Pablo Martinez Monsivais/Associated Press

Annie Linskey can be reached at annie.linskey@globe.com. Follow her on Twitter @annielinskey.