With 89 percent of the precincts reporting, nearly 52 percent of votes backed the agreement, which sharply divided the country between those arguing it would bring continued economic development and critics who feared it could hurt farmers and small businesses.
"Costa Rica's people have said 'yes' to the treaty, and this is a sacred vote," Arias said.
But Eugenio Trejos, the leader of the pact's opposition, said he would not recognize the results and vowed to wait for a manual recount scheduled to begin Tuesday.
"The people have spoken, and the achievements we have obtained won't be lost," he said. "That's why we will wait for the ballot-by-ballot recount."
Arias urged the nation to move forward.
"The treaty isn't what divides us," he said. "It's poverty that affects 900,000 Costa Ricans, a lack of work and violence. These are the things that separate us, and they will continue to be my priority."
The presumed victory was a surprise, given that most polls leading up to the vote had predicted an easy defeat.
Costa Rica is the only one of the six Latin American signatories to the trade deal, known by the acronym CAFTA, that has yet to ratify it. The pact is in effect in the Dominican Republic, Guatemala, Honduras, Nicaragua and El Salvador.
The results were closely watched by the White House, which fought a bruising political battle to get the deal ratified by the Congress, where it passed by a two-vote margin.
Ahead of the vote, U.S. officials and Arias appealed for voters to back the deal. The White House on Saturday said if Costa Ricans vote against joining the agreement, the Bush administration will not renegotiate the deal and it urged people to recognize the treaty's benefits.
The pact would "expand Costa Rica's access to the U.S. market, safeguard that access under international law, attract U.S. and other investment and link Costa Rica to some of the most dynamic economies of our hemisphere," White House press secretary Dana Perino said in a statement.
U.S. officials also suggested they may not extend trade preferences now afforded to Costa Rican products and set to expire next September.
Arias said a 'no' vote would affect industries in this Central American nation of 4.5 million people, and called it an "important tool for generating wealth in the country."
Arias, who won a Nobel Peace Prize for helping end Central America's civil wars in the 1980s, also said rejecting the pact would threaten trade benefits that help Costa Rica's textile and tuna industries.
But critics of the pact object to its requirements that Costa Rica open its telecommunications, services and agricultural sectors to greater competition. They also fear it will mean a flood of cheap U.S. farm imports.
When Arias arrived at a polling station to vote, opponents of the pact almost prevented him from entering and yelled "Arias traitor!" Others shouted in support of the pact.
Groups of demonstrators for and against the agreement marched Sunday in the capital, San Jose.
Pablo Chacon, a 63-year-old former truck driver, said he planned to vote 'yes' because that would mean more opportunities for his children.
"I have children who are studying and one even works for Intel, and if they took it away, what would my children do?" he said.
But many Costa Ricans were skeptical of the pact, or downright hostile.
Lawyer Flor Vega said she feared the trade agreement would end up giving foreign interests the development rights to Costa Rica's natural resources.
"I'm going with 'no' because the treaty has a very broad definition of land," she said. "They can use the ground and underground, and this is a good reason to say 'no.'"
As polls closed Sunday evening, electoral authorities estimated that participation surpassed 40 percent of registered voters, the minimum for results to be binding.
Despite its conflicts over trade, Costa Rica fares better than other Central American countries: It has a thriving eco-tourism industry, maintains relatively high-paying jobs and is a magnet for Salvadoran and Nicaraguan migrants.
Costa Rica exported $3.37 billion in goods to the United States last year and imported goods worth $4.57 billion, according to Costa Rica's trade ministry.
By Associated Press Writer Marianela Jimenez