President Hugo Banzer declared a general amnesty for all Bolivian political prisoners and exiles Tuesday night, partially giving in to demands of more than 1,200 students, religious leaders and relatives of union leaders who had participated in a 20-day hunger strike.

Gen. Banzer's announcement came in a speech televised throughout his South American nation. Just 24 hours before declaring the general amnesty, Banzer had ordered police in La Paz and in 10 other Bolivian towns to arrest scores of persons participating in the strike.

Initial news agency reports reaching Washington Tuesday said that more than 600 of the 1,290 strikers were arrested but the State Department said yesterday that the U.S. embassy in La Paz had confirmed only 130 arrests.

Banzer indicated that the general amnesty, which would allow return of all Bolivian exiles, did not necessarily mean that those charged with criminal activity or terrorism would be excused of their alleged crimes. "The general amnesty will not let Bolivia's enemies go unpunished," Banzer said.

The president also called on all political parties to join in preparations for general elections in July. Banzer has said a new civilian president will be chosen in a return to constitutional rule after more than a decade of military governments.

The State Department said the United States "welcomed" the Bolivian leader's reaffirmation that he plans to go ahead with the elections as planned. Two other South American military governments, in Peru and Ecuador, have also indicated that they will allow a return to elected government.