University students and public workers, meanwhile, maintained a separate vigil in front of the National Assembly, where lawmakers were to discuss a controversial proposal to privatize the country's state-run electricity and telephone services.
The 500 anti-riot officers cleared the highway at dawn, encountering little resistance from the farmers, officials said. The Red Cross treated protesters affected by the tear gas, but there were no reports of other injuries.
Public Security Minister Rogelio Ramos declared "a return to normalcy throughout the country" following the most serious wave of protests to face the government of President Miguel Angel Rodriguez.
The farmers have asked the government to stop the importation of agricultural products and for more financial help. Thus far, the government has refused to negotiate with them.
Initially, the farmers closed off all roads leading to Cartago, one of the country's principal cities, 23 kilometers (14 miles) southeast of San Jose. The blockade resulted in food and gas shortages in the capital.
At the National Assembly, lawmakers set to debate privatization of Costa Rica's state monopolies on electricity and telephone service ignored protesters who had gathered outside Saturday.
But labor union leader Albino Vargas insisted
that the protesters wouldn't leave "until
the government hears our voice."