"Unfortunately the United States has not been in complete control of its borders for decades and therefore illegal immigration has been on the rise," Mr. Bush said at a signing ceremony.
"We have a responsibility to enforce our laws," he said. "We have a responsibility to secure our borders. We take this responsibility serious."
He called the fence bill "an important step in our nation's efforts to secure our borders."
The centerpiece of Mr. Bush's immigration policy, a guest worker program, remains stalled in Congress.
And a handful of House Republican are at the brakes, blocking negotiations with the Senate for a bill that includes the president's proposal.
Still, Mr. Bush argues that it would be easier to get his guest worker program passed if Republicans keep their majorities in the House and Senate after the Nov. 7 elections. His proposal would allow legal employment for foreigners and give some of the estimated 11 million to 12 million illegal immigrants in the United States a shot at becoming American citizens.
The measure Mr. Bush put into law Thursday before heading for campaign stops in Iowa and Michigan offers no money for the fence project covering one-third of the 2,100-mile border.
Its cost is not known, although a homeland security spending measure the president signed earlier this month makes a $1.2 billion down payment on the project. The money also can be used for access roads, vehicle barriers, lighting, high-tech equipment and other tools to secure the border.
Mexican officials have criticized the fence. Outgoing Mexican President Vicente Fox, who has spent much of his six years in office lobbying for a new guest worker program and a chance at citizenship for the millions of Mexicans working illegally in the U.S., calls the fence "shameful" and compares it to the Berlin Wall.
Others have doubts about its effectiveness.
"A fence will slow people down by a minute or two, but if you don't have the agents to stop them it does no good. We're not talking about some impenetrable barrier," T.J. Bonner, president of the National Border Patrol Council, a union representing Border Patrol agents, said Wednesday.
Customs and Border Protection statistics show that apprehensions at border crossings are down 8 percent nationally for the budget year that just ended, Bonner said. Apprehensions were up in the San Diego sector, he said, an area of the nearly 2,000-mile border that has the most fencing.
A spokesman for Customs and Border Protection would not confirm the statistics or discuss reasons for the increase in the San Diego sector.
Sens. John Cornyn and Kay Bailey Hutchison, both Texas Republicans, had wanted to amend the fence bill to give local governments more say about where fencing is erected. They lost that battle, but Republican leaders assured them the Homeland Security Department would have flexibility to choose other options instead of fencing, if needed.
Cornyn said he voted for the fence because he wanted to help demonstrate that Congress was serious about border security.
"The choice we were presented was: Are we going to vote to enhance border security, or against it?" Cornyn said. "I think that's how the vote was viewed."