Despite guerrillas' calls for an electoral boycott and threats to sabotage polling stations, Guatemalans voted in large numbers today for a government.

Reports from the 3,339 polling places of this rugged land indicated a relatively high participation among the 2.3 million eligible voters, despite past experiences of rigged balloting by the ruling military.

Anything over 40 percent participation is being touted by officials as a sign of a successful election. Only 36 percent of the electorate voted in the last presidential elections in 1978 and absenteeism reached 80 percent in municipal elections two years ago.

Here in the Guatemalan highlands, in the nation's volcano-ringed second city, there was enthusiasm among the voters--who lined up early by the thousands at polling stations in gasoline stations, an artisans' cooperative and on tables set up along pot-holed dirt streets.

The voters, most of them Indians who make up more than half of the 7 million population, waited for up to three hours to cast their ballots. They chose among the presidential, congressional and municipal candidates presented by the one centrist and three conservative groupings contesting in the elections. While they waited, chatting, joking and shouting at anyone trying to break into the line, armed military patrols, backed by trucks with mounted .50-caliber machine guns, cruised the streets to keep the peace.

Soldiers in camouflaged uniforms had been put on alert to prevent the disruptions threatened by the four leftist guerrilla groups that have been battling the government with increasing intensity in the past two years.

The guerrillas scored a major publicity coup two days ago when one group, the National Guatemalan Working Party, the front of the Communist Party, kidnaped Alvaro Contreras, publisher of the Prensa Libre newspaper. They demanded publication of a manifesto, denouncing the elections as fraudulent, in Guatemalan newspapers as well as those throughout the capitals of Central America, Mexico, and in two U.S. newspapers. All Guatemalan papers printed it yesterday and television and radio stations broadcast it. The publisher has not yet been released.

By late afternoon, in spite of the guerrilla threats against the election, no incidents had been reported here. A similar nationwide pattern seemed to be unfolding, to the surprise of many observers familiar with the almost indiscriminate violence resulting from the guerrilla war in the countryside and assassinations of civilians in the cities.

Eight bombs went off in various neighborhoods of the capital last night, causing damage but no casualties. Bombs also were reported in towns as far away as Puerto Barrios on the Caribbean coast. Newspapers reported the car-bomb death of the body guard of the government-supported presidential candidate, Gen. Angel Anibal Guevara.

Guevara resigned as minister of defense to run for the presidency. As the official candidate of the armed forces, he is considered the front-runner. The military has been the arbiter of Guatemalan politics almost continuously since leftist president Jacobo Arbenz was overthrown in a CIA-backed coup in 1954.

Guevara is reported by various private polls to have run neck-and-neck with two other candidates: former vice president Mario Sandoval, who represents the extreme right wing, and Alejandro Maldonado, a former education minister who is being supported by the centrist Christian Democratic Party here.

The fourth candidate, Gustavo Anzueto, a U.S.-trained architect who advocates supply-side economics, is considered out of contention despite his support by retired general Carlos Arana, a former president whose previous power as a kingmaker appears to have waned.

There have been no leftist candidacies because most of the country's liberal and leftist leaders have been killed or are in exile, or intimidated from seeking office.

Despite the lopsided conservative bent of the candidates, the government of the current president, Gen. Romeo Lucas Garcia, has shown determination to present the elections as "pure and honest" in order to improve Guatemala's tarnished image abroad.

Faced with a guerrilla war his Army has been unable to dominate and an economic crisis flowing from investor fears and international ostracism, Lucas and other leaders insist that whoever emerges as the country's next president will be backed by the Army as well as public opinion.

The U.S. government has virtually cut ties with Guatemala at the insistence of the Congress, which reacted to human rights violations here, but the administration has indicated hopes that elections could provide a basis for closer ties.

Observation of polls in various cities today showed no irregularities. Illiterates voted with thumb prints. The ballots were to be counted locally in front of poll observers of each party after the voting ended at midnight. Official results are not expected before Monday morning.

If none of the candidates gets a majority, it will be up to the outgoing Congress, dominated by pro-Guevara congressmen, to select the president from the two candidates who get the highest vote.