A.J. Foyt joined Frenchmen Bob Wolleck and Claude Ballot-Lena in a Porsche Turbo 935 for an overwhelming victory in the 24-Hour Pepsi Challenge sports car endurance race yesterday in Daytona Beach--despite rain, mechanical problems and Wolleck's initial reluctance to share the driving with the 48-year-old Foyt.

The winning car, the seventh straight turbocharged 935 to win this International Motor Sports Association Camel GT event, completed 618 laps and 2,373.12 miles, finishing six laps ahead of the Chevrolet-March 83G prototype of Randy Lanier, Terry Wolters and Marty Hinze.

The winners had to overcome a 12-lap deficit after early mechanical problems, and a controversy after Foyt was hired during the night to replace car-owner Preston Henn as the third driver.

Foyt started the race in a British-built Aston-Martin, but the car went out after about five hours with an engine problem. Henn said he talked to the four-time Indianapolis 500 winner before the race about driving the German-built car if the Aston-Martin didn't last.

Wolleck was not happy at first over the hiring of Foyt, who now has added America's most prestigious distance event to a his record of victories in the Indy 500, the Daytona 500, the 24-Hours of LeMans and other races.

"I'm very upset about it," Wolleck said as Foyt headed onto the track in the rain with a one-lap lead over the Lanier team--a lead gained an hour earlier by Wolleck. "He doesn't know the car, he doesn't know the rain, he doesn't know anything."

But after Foyt took the unfamiliar car out in the rain and extended the lead to almost two laps in about an hour of driving, the four-time European Porsche Cup champion cooled off, joking with Foyt when the latter pitted.

"I knew he'd be a better rain driver than I," said Henn, who had taken only one turn at the wheel. "Wolleck did not understand Foyt was replacing me. He thought he (Foyt) might be replacing him and he didn't want to give up a ride in the lead car. It's no problem now. He (Wolleck) is very happy.