INDIANAPOLIS, AUG. 21 -- The desperately awaited rematch between the U.S. and Cuban baseball teams was nearly foiled twice today. The U.S. team blew a four-run lead, but got superb relief pitching from Jim Abbott and Cris Carpenter to hold on for a 7-6 victory over Canada.

Cuba fell behind by four runs, entered the eighth trailing by two, but mounted a furious rally which ended when Antonio Pacheco homered to complete the dramatic 6-5 victory over Puerto Rico.

The U.S. and Cuba teams will meet at 3 p.m. (EDT) Saturday for the Pan American gold medal. Cuba has won the gold the last four Pan Am Games, the U.S. not since 1967. The U.S. team will likely send Auburn's Gregg Abbott against Cuba's phenom, Pablo Abreu, 20.

But even should the Americans lose, they at least can leave here feeling proud that the victory tonight -- making them 8-0 in this competition -- qualifies them for the 1988 Olympic Games.

The hitting star tonight was third baseman Scott Livingstone, who drove in five runs in the first two innings and hit for the cycle. Starter Joe Slusarski was roughed up early. But Abbott, the one-handed athlete from Michigan, gave up only three hits in 4 2/3 innings, and Georgia's Carpenter pitched two innings for the save.

The U.S. players and coaches were more relieved than anything else. "I was worried we'd be looking ahead to Cuba, which we didn't want to do because Canada always seems to put it together and play with a lot of confidence against us," U.S. Coach Ron Fraser said. "We sure did play a terrible ballgame . . . After winning a game like that, though, you got to feel you're due for a good game."

He was upset, however, that he had to use Carpenter, his best relief pitcher. "But I had to go with the hammer and close them out," Fraser said.

"I'll be ready for Cuba," Carpenter said. "I haven't played all summer to back out now."

Earlier, the Cubans found themselves involved in one of the most exciting events of these Games, and afterward another confrontation.

"I don't want to take all the credit," Pacheco said. "I was not expecting a home run because I had struck out three times before."

The Puerto Rican team had to be the hard-luck story of these Games. It was three pitches away from being undefeated and the top-seeded team in the medal round. Instead, it lost to Cuba, 1-0; to the U.S. team, 4-0, in an 11-inning game Wednesday and, finally, to Cuba today.

The afternoon action on the field, hot as it was, was nearly matched by the postgame action in the stands. The Cuban team had already squared off with the Puerto Ricans after Cuba's Luis Ulacia was thrown out of the game for spiking Puerto Rican first baseman Efrain Garcia.

Both teams ran onto the field, but umpires thwarted a fight. The police didn't have quite the same success with the ensuing fracas, although major violence was averted.

While the Cuban players were shaking hands with the Puerto Ricans in front of the first-base dugout, at least one fan started screaming at the Cubans, "You Communists were lucky to win," according to a security man who was nearby.

Victor Mesa, the Cuban center fielder, threw a pear toward the fan, the guard said. The fan, who identified himself as Leopoldo Rey, a Cuban-American from Miami, told reporters he taunted the Cuban players and called them Communists.

A man identified as a Cuban security guard hit Rey, who hit back with his camera. Mesa tried to catch Rey but was stopped by police.

Lt. Tom Carr of the Indianapolis Police Department said: "We do not believe the individual was part of any anti-Castro organization . . . No arrests were made . . . A good number of security people will be on hand for tomorrow's game."

Pan Am officials expect interest and tension in Saturday's gold medal game to be high. And the anticipated sell-out crowd would be lucky to see a game like the ones today.

The Puerto Ricans took their 5-1 lead on prodigious home runs by Garcia, Helson Rodriguiez and 5-foot-5 center fielder Angel Morales.

But the drama that unfolded probably surpassed anything at these Games, with the possible exception of Ty Griffin's two-out, two-strike, ninth-inning homer last week that enabled the U.S. team to beat Cuba.

Hector Gutierrez had struck out 11 Cubans in seven innings, 10 of them swinging. Luis Casanova had homered and Omar Linares had doubled in a run. But Puerto Rico still led, 5-3, with two out in the eighth.

That's when one play changed the game and the rest of the baseball medal round. Eddie Ahorrio, the Puerto Rican right fielder, was beneath Alejo O'Reilly's fly ball ready to record the third out. Whether the sun bothered him is of some debate, but the fact is he dropped the ball for a two-base error.

Pedro Medina, who had been on second, scored to make it 5-4. Larazo Vargas, running for O'Reilly, stole third base and scored on the catcher's throwing error to tie the game at 5-5.

In water polo, the United States beat Brazil, 15-4, and will play the Cubans for the gold medal Saturday.

In soccer, Brazil beat Chile, 2-0, in overtime to win the gold medal.