The House narrowly approved the Central American Free Trade Agreement this morning, delivering a hard-fought victory to President Bush while underscoring the nation's deep divisions over trade.

The 217 to 215 vote came just after midnight, in a dramatic finish that highlighted the intensity brought by both sides to the battle. When the usual 15-minute voting period expired at 11:17 p.m., the no votes outnumbered the yes votes by 180 to 175, with dozens of members undeclared. House Republican leaders kept the voting open for another 47 minutes, furiously rounding up holdouts in their own party until they had secured just enough to ensure approval.

The House vote was effectively the last hurdle -- and by far the steepest -- facing CAFTA, which will tear down barriers to trade and investment between the United States, Costa Rica, the Dominican Republic, El Salvador, Guatemala, Honduras and Nicaragua.

"This win sends a powerful signal to the region and the world that the United States will continue to lead in opening markets and leveling the playing field," said Rob Portman, the U.S. trade representative, in a statement issued immediately after the vote.

Although the deal was approved by the Senate last month, it was overwhelmingly opposed by House Democrats who contend that it is wrong to strike a free-trade pact with poor countries lacking strong protection for worker rights. Only 15 of the 202 House Democrats backed the accord, while 27 out of 232 Republicans voted against.

During last night's debate, which lasted 21/2 hours, the bitterness of the Democrats' opposition shone through in condemnations such as that by Ohio's Dennis J. Kucinich, who thundered: "CAFTA is for multinational companies who want to make a profit by shutting plants in the United States and moving to places with cheap labor."

To win, the White House and GOP congressional leaders had to overcome resistance from dozens of Republican members who were also loath to vote for the accord because of issues ranging from the perceived threat to the U.S. sugar industry to more general worries about the impact of global trade on U.S. jobs.

Rep. Eric I. Cantor (R-Va.), the chief deputy majority whip, said as members left the Capitol that trade votes are always hard but that this one was especially so for Republicans because "the other side really ramped this up and made this a political vote."

Before the vote, GOP leaders, who had negotiated deals in recent days to sway Republicans, made it clear they were prepared to twist arms. "It will be a tough vote, but we will pass CAFTA tonight," House Majority Leader Tom DeLay (R-Tex.) told reporters yesterday morning. "And we will do it with very few Democrats on board."

Underscoring the importance that Bush attaches to the pact, he put his prestige on the line by making a rare appearance with Vice President Cheney at the weekly closed-door meeting of the House Republican Conference. Bush spoke for an hour, lawmakers said, stressing the national security implications of CAFTA, which are rooted in the concern that growing anti-American sentiment in Latin America would flourish if the United States refused to open its markets wider to the nations that negotiated the pact.

"Mothers and fathers in El Salvador love their children as much as we love our children here," Bush said, stressing the need to look out for the young democracies in "our neighborhood," according to lawmakers. He also noted that four of the six countries -- the Dominican Republic, El Salvador, Honduras and Nicaragua -- have assisted the U.S. military effort in Iraq.

The last-minute negotiations for Republican votes resembled the wheeling and dealing on a car lot. Republicans who were opposed or undecided were courted during hurried meetings in Capitol hallways, on the House floor and at the White House. GOP leaders told their rank and file that if they wanted anything, now was the time to ask, lawmakers said, and members took advantage of the opportunity by requesting such things as fundraising appearances by Cheney and the restoration of money the White House has tried to cut from agriculture programs. Lawmakers also said many of the favors bestowed in exchange for votes will be tucked into the huge energy and highway bills that Congress is scheduled to pass this week before leaving for the August recess.

So many top Bush administration officials were working the Capitol last night that Democrats joked that the hallways looked like a Cabinet meeting. Cheney made an after-dinner trip to the second floor of the Capitol and stayed until shortly after 10 p.m., meeting with members.

The Democrats voting in favor were Reps. Victor F. Snyder (Ark.), Melissa L. Bean (Ill.), Dennis Moore (Kan.), William J. Jefferson (La.), Ike Skelton (Mo.), Gregory Meeks (N.Y.), Edolphus Towns (N.Y.), Jim Cooper (Tenn.), John S. Tanner (Tenn.), Henry Cuellar (Tex.), Ruben Hinojosa (Tex.), Solomon P. Ortiz (Tex.), Jim Matheson (Utah), James P. Moran Jr. (Va.) and Norman D. Dicks (Wash.).

The Republicans voting against were Reps. Duncan Hunter (Calif.), Tom Tancredo (Colo.), Rob Simmons (Conn.), Connie Mack (Fla.), Charles Whitlow Norwood Jr. (Ga.), C.L. "Butch" Otter (Idaho), Mike Simpson (Idaho), John N. Hostettler (Ind.), Charles W. Boustany Jr. (La.), Bobby Jindal (La.), Thaddeus McCotter (Mich.), Candice S. Miller (Mich.), Gil Gutknecht (Minn.), Dennis Rehberg (Mont.), Scott Garrett (N.J.), Frank LoBiondo (N.J.), Christopher H. Smith (N.J.), Virginia Foxx (N.C.), John M. McHugh (N.Y.), Howard Coble (N.C.), Walter B. Jones Jr. (N.C.), Patrick T. McHenry (N.C.), Robert W. Ney (Ohio), Ron Paul (Tex.), Virgil H. Goode Jr. (Va.), Barbara Cubin (Wyo.) and Shelley Moore Capito (W.Va.).

Among representatives from Maryland and Virginia, Republicans voted in favor and Democrats voted against except Moran, who voted for; Goode, who voted against; and Rep. Jo Ann S. Davis (R-Va.), who did not vote.

The victory for Bush was crucial because it came at a time when his clout on Capitol Hill has been called into question, and it also gave a badly needed boost to his broader free-trade agenda. The White House is hoping to hammer out a free-trade accord encompassing all the nations of the Western Hemisphere. More important, it wants to successfully conclude the talks underway in the World Trade Organization to lower trade barriers on a global basis.

Those considerations turned CAFTA into a political battleground far out of proportion to its economic significance. Proponents touted the six countries involved as constituting the second largest market for U.S. goods in Latin America after Mexico, absorbing $15 billion in U.S. exports last year. But that is just a little more than 1 percent of the $1.15 trillion in U.S. exports.

Democrats and their union backers fear that congressional approval of the accord will signal that free-trade deals are possible with almost any country, no matter how low its wages or how inadequate its labor protections. House Minority Leader Nancy Pelosi (D-Calif.) warned that the political consequences will come back to haunt Bush.

In the debate, proponents cited the fact that CAFTA is the latest in a series of free-trade deals with individual countries -- including Jordan, Singapore, Chile and Australia -- that Congress has approved in recent years. They demanded to know why opponents would not give the same favorable treatment to neighboring countries. Although CAFTA might not be perfect, "on the whole this agreement does much more for Central America than we will have the opportunity to do for a long time to come," Moran said.

Supporters also hammered home the argument that most imported goods from Central America already enter the U.S. market duty-free, under the Caribbean Basin Initiative. CAFTA "levels the playing field," contended Rep. Ron Lewis (R-Ky.), because it would immediately eliminate the tariffs imposed by Central American nations on 80 percent of their industrial imports from the United States, and 50 percent of the agricultural imports.

Foes retorted that CAFTA differs from accords such as the ones with Morocco and Australia. "This is the first agreement in which we would move backwards in enforcing international labor standards," said Rep. Benjamin L. Cardin (D-Md.), noting that the provisions protecting worker rights are weaker than those under the Caribbean pact.