ANCHORAGE, Alaska (AP) _ Joseph Hazelwood exercised bad judgment in virtually every decision he made the night the Exxon Valdez ran aground, a veteran sea captain testified Tuesday at Hazelwood's trial.

Robert Beevers, a consultant who spent 14 years as a tanker captain, said the worst move Hazelwood made on March 24 was leaving the ship's bridge in the hands of a third mate during a hazardous passage into Prince William Sound.

''He created the risk of grounding, of losing the vessel, of fire, explosion and death to his crew and of pollution that occurred,'' said Beevers, who testified as a prosecution expert.

Soon after Hazelwood left the bridge, the Exxon Valdez impaled itself on Bligh Reef, causing the nation's worst oil spill.

''In my opinion, it was bad judgment to leave the bridge ... at that location, at that time,'' Beevers said. ''Whether it was one minute or 20 minutes, it was bad judgment.''

In another development Tuesday, a federal grand jury in Anchorage indicted Exxon Corp. and its shipping subsidiary on five counts in the spill.

If convicted of the two felonies and three misdemeanors in the indictment, the company could be fined up to $1.6 million, U.S. Attorney General Dick Thornburgh told a Washington news conference.

The government could also seek as much as $700 million more under federal laws allowing recovery of twice the amount of the proven loss caused by the spill, U.S. Attorney Mark Davis of Alaska said at the news conference.

Hazelwood attorney Michael Chalos criticized the timing of the indictment.

''It's interesting that it should be happening now just as we're finishing the Hazelwood trial,'' Chalos said. ''They waited this long, why couldn't they wait two weeks longer?'' The trial is expected to last about two more weeks.

Nearly 11 million gallons of oil were dumped into the pristine sound, killing countless birds, fish and other wildlife and blackening hundreds of miles of rocky shore.

Hazelwood, 43, of Huntington, N.Y., is charged with second-degree criminal mischief, a felony, and three misdemeanors: reckless endangerment, operating a vessel while intoxicated and negligent discharge of oil. If convicted on all counts, he could be sentenced to up to 7 1/4 years in prison and $61,000 in fines.

In the trial's fourth week, Beevers offered the most direct criticism yet of Hazelwood, giving him bad marks on such actions as his last-minute arrival before sailing, a hasty decision to divert the tanker from shipping lanes to avoid ice and transferring control to the third mate shortly before the ship rammed the reef.

Hazelwood's attorneys objected repeatedly to the testimony, saying he is not charged with exercising bad judgment and that Beevers' opinions were irrelevant. But Superior Court Judge Karl Johnstone allowed the testimony to continue and reprimanded Hazelwood lawyer Dick Madson after a pointed exchange with Beevers.

Madson rose from his chair to cross-examine Beevers and declared, ''Am I standing here before the eyes of God?''

''Mr. Beevers, you're not perfect, are you?'' Madson asked Beevers.

''No, I'm not,'' Beevers responded.

''And have you ever had someone hired to say you exercised bad judgment?'' said Madson.

''No,'' said Beevers.

Beevers, who spent four hours on the witness stand and was to continue Wednesday, said he is being paid $35,000 for helping in the case. He retired from the merchant marine in 1987.

Beevers was especially critical of Hazelwood's decision to leave third mate Gregory Cousins alone on the bridge with a helmsman.

The witness portrayed Cousins as a mate far too inexperienced to be left with such a task, noting that he had only 13 months of sea experience on his license.

''He was heading into a dangerous situation, a situation that needed someone with experience to maneuver it, a situation that was beyond what you would expect a relatively inexperienced third mate to do on his own,'' Beevers said.

He also criticized Hazelwood for leaving at the wheel a helmsman who had problems with steering.