Nine days before the Ocean Ranger sank in a storm, killing 84 crew members, the drilling rig's captain accidentally opened the wrong valve and caused the platform to tilt, a drilling foreman testified yesterday.

Jim Counts of the Ocean Drilling and Exploration Co. told a Coast Guard board that the huge platform developed a sudden, 5-degree list on Feb. 6. The captain, Clarence E. Hauss, later admitted he incorrectly opened two valves in the ballast system, Counts said.

Counts said the incident was significant enough that the drilling foreman "told the captain to stay out of the ballast control room unless the operator was there."

Also, a former master of the rig said yesterday that the Ocean Ranger had experienced problems with control-room equipment and that a new man was on duty in a main control room the night the rig sank.

Capt. Geoffry Dilks testified that the ballast system aboard the world's largest drilling rig had problems with cracked valves, a control panel had gauges that were hard to read and a computer had been down for several months.

Dilks was on leave when the giant rig sank off the coast of Newfoundland; Hauss died in the accident.