President Bush capped off one of his top legislative priorities Tuesday by signing into law a free trade pact with six Latin American countries that Congress only barely approved last week, saying the measure was both "good for America" and would "advance peace and prosperity throughout the region."

Bush signed the hard-fought U.S.-Central American Free Trade Agreement, or CAFTA, which turned into a fight over the future of U.S. trade policy, at a ceremony in the East Room of the White House just before heading to his ranch in Texas for his August vacation. CAFTA is the first-ever U.S. trade pact with Central America.

"CAFTA is more than a trade bill," Bush said at the morning ceremony. He said the measure would help strengthen young democracies in Central America and the Caribbean and prove to those countries that the U.S. stands firmly behind them.

He said CAFTA was also good for U.S. industry.

"U.S. exports to Central America still face hefty tariffs there," Bush said. "CAFTA will end these unfair tariffs against American products and help ensure that free trade is fair trade."

He said that by "leveling the playing field for our products," CAFTA will help create jobs in the United States.

Critics from both political parties had been arguing that the agreement would instead send American jobs overseas and play a part in the exploitation of Central American workers. Dozens of Republican members of the House opposed the pact because of issues including the perceived threat to the U.S. sugar industry and more general worries about the impact of global trade on U.S. jobs.

The agreement, which eliminates tariffs on U.S. exports to Costa Rica, El Salvador, Guatemala, Honduras, Nicaragua and the Dominican Republic, won passage in the House of Representatives last week by only two votes.

CAFTA squeezed through the House by 217-215 votes only after a massive lobbying effort by the Bush administration. The agreement was passed after midnight last Thursday morning in a dramatic finish that highlighted the intensity brought by both sides in the battle.

Besides eliminating tariffs on U.S. exports, CAFTA also locks in and expands the duty-free access those countries already enjoy to the U.S. market. It also seeks to spur investment in the area and strengthens protections for intellectual property.

Bush had framed the agreement as a vital component of his second-term promise to spread democracy and freedom throughout the world in a bid to combat terrorism. He emphasized that CAFTA was in the national security interests of the United States because it would strengthen the democracies of an area that 20 years ago were wracked by civil war and political upheaval.

"All of us understand that strengthening our economic ties with our democratic neighbors is vital to America's economic and national security interests," Bush said. "And all of us understand that by strengthening ties with democracies in our hemisphere, we are advancing the stability that comes from freedom."

Democrats opposed CAFTA, saying recent free trade agreements have promoted the flight of American jobs overseas. They also said labor provisions were too weak to protect Central American workers from exploitation.

Guatemala, El Salvador and Honduras have already ratified the pact, which will go into effect as soon as those countries and the United States agree on a date. The other three counties have two years to approve it.