Efforts by Guatemala to carry out its first undisputed general election in decades, with American and other foreign observers looking on, collapsed yesterday in outraged charges of fraud.

"The fraud perpetrated here is so transparent that nobody could expect to get away with it," said Prof. John Plank of the University of Connecticut, sent as an observer for the Democratic Party, by telephone from Guatemala City.

All counting of the ballots cast in Sunday's election was suspended yesterday after the widespread charges, including the assertion by the mayor of Guatemala City that one of the candidates in the race to succeed him received more votes from a polling station than the total number of ballots cast there.

Plank is part of a three-member mission delegated by Western political parties as observers.

The fraud, he said, "simply rein forces the deep cynicism of the Guatemalan voters," who were asked to choose among two generals and a colonel for the presidency. He said voters told him repeatedly that "any civilian could have beaten any of these candidates."

Early vote totals had shown Gen. Romeo Lucas, considered the military's unofficial candidate, to be leading. But counting of votes from the countryside took a sudden shift in favor of the rightist Col. Enrique Peralta Azurdia, who headed a government that seized power in a coup 12 years ago.

By all counts, Gen. Ricardo Peralta Mendez, the Christian Democratic Party candidate, was running third.

Plank said the observers were offered all facilities, including an ample interview with the current president, Gen. Kjell Laugerud, who was not allowed to run again.

"He impressed us as having made a sincere and dedicated effort for fair elections, only to be thwarted by the conscious efforts of some small groups," said Plank.