Three American sport fishermen and two Costa Rican guides arrested Friday in two rented boats off Nicaragua's Caribbean coast were freed yesterday and flown back to Costa Rica, Nicaragua said. The U.S. Embassy in San Jose said they were in waters of Costa Rica, which protested to Managua.

The embassy officials said Harry Kime, 73, of Illinois, Luke Dalles, 45, of Michigan, and David Donaldson, 37, entered Costa Rica as tourists and were apparently on a fishing trip.

In another development, a military commander said antigovernment insurgents overran a town near the Honduran border, the first official acknowledgment of rebels taking a town.

Manuel Salvatierra, commander of Army operations in northwestern Nicaragua, said three government trucks carrying coffee were destroyed in the rebels' attack on the town of Achuapa, 15 miles from Honduran border. He said the rebels killed one soldier and a civilian who were guarding the trucks and entered to "terrorize" the town's 15,000 residents.

The insurgents' Honduran-based radio reported its forces held Achuapa for "several hours" before retreating into surrounding hills.

Christian Pichardo, head of military operations in the border province of Esteli, said rebels from the Nicaraguan Democratic Front had centered their attacks on three areas along the border with Honduras.