A federal magistrate ordered probation Friday for two Maryland men who pleaded guilty to beating Rep. Gerry E. Studds (D-Mass.) near Dupont Circle in June.

Magistrate Patrick Attridge told the men, both 19, that he considered ordering them to prison but chose probation because, he said, drunkenness impaired their judgment.

Attridge also said their admission of guilt played a part in his decision.

James L. Byrne, of Silver Spring, was placed on probation for one year and ordered to provide 100 hours of community service and pay $170 in restitution. Thomas E. Carter, also of Silver Spring, was placed on probation for three years and ordered to provide 100 hours of community service, pay $170 in restitution and enroll in a program for alcohol abusers.

Byrne and Carter faced a maximum of one year in prison and a $100,000 fine for assaulting a member of Congress.

The attack took place early June 7 as Studds was walking home alone. The men, according to their own admissions, had been drinking near Studds's home, emerged from the bar and were unable to remember where they had parked their car. The congressman was punched, knocked to the ground and kicked, prosecutors and witnesses said.

The men said they did not know that Studds was a congressman until after the assault. They insisted that the attack had nothing to do with Studds's being homosexual.