The United States swept all five gold medals in Pan American Games swimming tonight. Four victories were routine, the fifth may have saved one of the greatest U.S. swimmers for a shot at Olympic gold in Los Angeles next summer.

The U.S. medal count zoomed to 52 golds and 95 medals overall, tops in both. Cuba was second with 30 gold medals and 69 overall, and Canada third with six golds among its 48 medals.

Rowdy Gaines, so disgusted by his third-place finish in Wednesday's 200-meter freestyle that the contemplated instant retirement, regained his confidence tonight by capturing the 100 freestyle.

It was not an easy victory and Gaines' time of 50.38 approached neither his world record of 49.36, nor the Pan Am mark of 50.09 he established in the morning qualifying.

Gaines trailed Puerto Rico's Fernando Canales, a University of Michigan product, at the 50-meter turn and in the end he was a bare .05 in front of Canales. Still, it was enough for a gold medal and a complete change of attitude.

"It's just like somebody pulled up an anchor," said Gaines, 24, the elder statesman of the U.S. swim team. "I know the time was slow, but it doesn't matter. All I wanted to do was win. I'm so happy to be standing here talking to you guys . . . If I had talked to you Wednesday, I might have slit my wrist. I would have quit on the spot. But Coach (Don) Gambrill told me not to talk.

"As far as I was concerned, it was all over with. If it wasn't for the people on our swimming team I wouldn't be here tonight. Rick Carey sat me down and relaxed me. He told me to be carefree, that 'fear sinks and courage floats'.

"The first night I was scared on the blocks and I don't swim well scared. All I thought about was losing. And when Bruce Hayes went past me, I just figured I was beaten.

"Tonight I knew Canales was with me and I had the attitude that I'm going to beat you, or at least you've got to beat me, I'm not going to beat myself."

This has been an up-and-down year for Gaines, who has often said that he doubted he would go through another year of training and sacrifice to prepare for the Olympics. "Going into this meet, I was leaning heavily on not swimming (next year)," Gaines "Now I'm leaning heavily on swimming. I haven't decided, though, and I'll tell my parents and coach before I tell you."

The man who needed consolation tonight was Chris Cavanaugh, who placed fourth behind Gaines, Canales and Venezuela's Albertoh Mestre, thus becoming the first U.S. male swimmer to miss a medal.

Carey later took the 200-meter backstroke in 1:59.34, a Pan Am record, but failed to lower his world mark of 1:58.93.

The U.S. women were solid gold and silver. Sue Walsh set a meet record of 1:02.48 in the 100-meter backstroke, with Joan Pennington second.

Tiffany Cohen breezed in the 400-meter freestyle, although unhappy with her slow time of 4:12.27, and Sippy Woodhead earned the silver.

The U.S. women breezed home in the 4x100-meter frestyle relay in 3:46.46, with Mary Wayte's 56.36 on the third leg the fastest split. Other members of the quarter were Sterkel, Dara Torres and Carrie Steinseifer.

The U.S. women's basketball team finally played its first game and defeated Brazil, 107-92.

In softball, U.S. pitcher Lori Stoll of of Chillicothe, Mo., threw her second straight no-hitter, a perfect game, 1-0, against Puerto Rico.

The U.S. women's volleyball team defeated Brazil, 15-3, 15-6, 16-14, and the water polo team also remained undefeated by topping Puerto Rico, 16-5. However, the soccer team was beaten by Chile, 2-1.

Boxers Paul Gonzales of Los Angeles and Steve McCrory of Detroit advanced to the semifinals, Gonzales debuting in the junior flyweight class and outpointing Colombia's Arcelio Diaz and McCrory outpointing Puerto Rico's Juan Casanova in the flyweight division.