Two men pleaded guilty to the armed robbery of two University at Buffalo students in a Winspear Avenue apartment in March, the Erie County District Attorney’s Office announced Monday.

Donovan Haigler, 25, and Lance Minton Jr., 23, both of Buffalo, each pleaded guilty to two counts of first-degree robbery.

The two had visited the apartment of the two women victims previously because they were acquainted with a third roommate, authorities previously said. When Haigler and Minton stopped by March 28 – ostensibly looking for the third roommate – a rifle was pulled from a bag that one carried and the victims were robbed at gunpoint of a small amount of cash.

After calling friends with the descriptions of the two men, the victims learned the first name of one of the assailants was Donovan, according to Erie County District Attorney Frank A. Sedita III. The victims and their fellow students searched their Facebook accounts and found photographs and names of the two men, Sedita said.

With that information, Buffalo police determined the men and recovered the gun used in the robbery.

The quick-thinking victims and the fast response of the police officers and detectives left the defendants “with no reasonable alternative but to plead guilty as charged and thrust themselves upon the mercy of the court,” Sedita said.

The two men face anywhere from five years to 25 years in state prison.

The two, who remain free on bail, are scheduled to be sentenced by State Supreme Court Justice Christopher J. Burns on Feb. 13.