WASHINGTON (AP) _ A Harvard law professor urged senators Tuesday to reject the nomination of President Bush's cousin as a federal appeals judge, saying the appointment would violate the nation's anti-nepotism law.

''He would not have gotten this nomination if he were not the president's cousin,'' Alan M. Dershowitz told a Senate Judiciary Committee hearing on the nomination of John M. Walker.

Walker, 48, is a District Court judge in New York.

The committee is not expected to vote for several weeks on whether to recommend confirmation by the full Senate to the U.S. 2nd Circuit Court of Appeals. Such a delay is normal and the nomination has not drawn opponents other than Dershowitz.

Walker ''got this appointment because of family connections,'' Dershowitz said, alleging that it ''violates the anti-nepotism statute both in language and in spirit.''

The 1967 law bars naming relatives to government jobs. Dershowitz said he believes it applies to the Walker nomination but told reporters in a hallway afterward that there was room for disagreement on that point.

He said that even if the law does not apply to a judicial nomination, Bush's nomination of Walker ''violates the spirit of the law.''

The elegantly dressed Walker, who bears a remote resemblance to his cousin, sat a few feet away with an impassive expression most of the time as Dershowitz described him as an ''average'' judge. Once he shook his head impatiently during Dershowitz's testimony.

Dershowitz alleged that Walker once held an improper conversation with an attorney in a lawsuit stemming from the Claus Von Bulow society murder trial.

Walker denied the allegation.