The Chesapeake Bay "crab war" between Maryland and Virginia moved to Capitol Hill yesterday, and when the smoke cleared, it appeared that Virginia had lost the latest round.

Under a bill by Rep. Herbert E. Bateman (R-Va.), designed to keep Maryland crabbers out of Virginia waters, states would be given the authority to restrict nonresidents from harvesting a limited marine resource in a state's internal waters.

But Bateman himself noted after hearings on the bill yesterday that the chances of passage by this Congress are virtually nonexistent. "I can't in all candor say that this bill will be enacted this Congress," he said.

Rep. Roy Dyson (D-Md.), for one, was sharply critical of the bill, saying it would "create a lot of bad blood" between the two states and could endanger the Chesapeake Bay cleanup effort.

The conflict between Maryland and Virginia arose after a 1982 federal court ruling gave Maryland watermen the right to crab on Virginia's side of the Chesapeake Bay. Crabbing is banned in Maryland waters in late winter and early spring. During those times, Maryland watermen have started crossing over to the Virginia side in large numbers, according to Virginia officials.

Rep. John B. Breaux (D-La.), chairman of the House subcommittee that held the hearings, said Bateman's bill might be getting Congress involved in an area that should be handled by the states, through some sort of cooperative management program.

"You can't draw an imaginary line down the middle of the Chesapeake," said Breaux. "Crabs don't know if a pot belongs to a Marylander or a Virginian. The end results are the same."

Bateman, who represents the Tidewater area and is involved in a tough congresional reelection race, introduced the legislation this summer. His Democratic opponent, John J. McGlennon, promptly accused Bateman of playing politics and said the act would be struck down in the courts as unconstitutional.

Bateman said yesterday that "constitutional scholars" had assured him that the bill "will withstand the judicial scrutiny of the courts."

But Ralph W. Tarr, deputy assistant U.S. attorney general, said, "The Department of Justice believes that serious constitutional issues are raised by the bill . . . . "

After the hearing, Bateman said that even though the bill seemed doomed, "I feel it served a useful purpose." By introducing the bill and holding these hearings, we introduced to Congress a novel approach for management of marine resources."