A night of drinking and birthday celebrating ended in a bloody stabbing Sunday morning inside a Montgomery County high-rise apartment, leaving a 23-year-old Georgetown University law student dead and his high school friend from Northern Virginia charged with murder, according to arrest records in the case.

Rahul Gupta, 24, was being held Monday in the Montgomery County jail on $2 million bond, according to court records. He was pursuing a master’s degree in biomedical engineering at George Washington University.

The victim, Mark Edward Waugh, was in his first year of law school.

“He was the best friend anyone could have,” said Amelia Henry, a close friend of Waugh’s. “He was going to change the world.”

On Monday, she asked friends to gather at her parents’ house in Virginia, posting an invitation on Facebook that underscored how those who knew both young men were stunned by the news.

“To all who need to sort through this insanity,” Henry wrote, “please know my house is open for people who need to pray, cry, or just talk about how lucky we were to have Mark in our lives.”

Both Waugh and Gupta attended Langley High School in McLean, Va., where they took several Advanced Placement and honors classes together. Waugh was in an after-school robotics club. Gupta played on the varsity tennis team.

Arrest records in the case, in which detectives provided their account to support a charge of second-degree murder, paint a picture of several friends going out Saturday to celebrate Gupta’s birthday. But things later appear to have turned to alcohol-fueled confusion and — at least based on the perception of one member of the party — a jealous rage.

The case began for police at 3:25 a.m. Sunday, when they were summoned for a report of unknown trouble inside an apartment in the high-rise in Silver Spring’s revitalized downtown. Officers arrived and heard movements and yelling inside. They knocked, didn’t get an answer, then went through the unlocked door, according to the charging document.

A woman with blood on her ran toward them.

“I don’t know what happened. Can you tell me?” she asked the officers, according to the charging document.

As the officers made their way into the apartment, they saw blood on the walls of the kitchen and living area and saw a man — later identified as Gupta — lying on the ground. He was covered in blood. The officers asked whether he was hurt.

“I don’t think so,” Gupta said, according to the detectives’ account.

“What’s going on?” one of the officers asked him.

“I walked in on my girlfriend cheating on me,” Gupta said, according to the charging papers. “My girl and my buddy were cheating. My girl was cheating with my buddy. I walked in on them cheating and I killed my buddy.”

It remains unclear, even to the police, whether what Gupta said he thought was going on between the two was true, according to a law enforcement official who spoke on the condition of anonymity because the case is pending.

The officers found another man lying on the floor. It was Waugh, and he was covered with blood and was unresponsive, according the police. He had “multiple cutting and defense-type injuries to his body” and was pronounced dead, according to court records. Police say a knife was used in the attack.

Officers took Gupta, who was not injured, into custody and drove him to police headquarters. While he was waiting to speak to a detective, he spoke to one of the officers, according to arrest records.

Gupta told the officer he’d made a mistake and added, “He tried to kill me, though,” the arrest records recount him as saying.

By this point, police were starting to piece together how the night started. Gupta, Waugh and two others — including Gupta’s girlfriend — went out to celebrate Gupta’s 24th birthday. Gupta, Waugh and the woman went back to the apartment, where Gupta and the woman lived.

Gupta spoke further with police, saying he thought Waugh and the woman were involved in a relationship behind his back, the documents state. He said he was awakened by the woman’s yells. Gupta also told police that he knew Waugh had suffered a stab wound — “even though that information had not been disclosed to him by investigators.”

Detectives also spoke with the 23-year-old woman, who told them that after the three returned to the apartment, they continued drinking and doing shots of alcohol. She told detectives she didn’t remember anything after the last shots and was awakened by Gupta yelling at her to call 911.

A classmate of Waugh and Gupta’s, now an actor in Los Angeles, said he played tennis with Gupta on the high school team and was in the after-school robotics club with Waugh.

Waugh went on to James Madison University, where he excelled as a debater. At one point last year, he taught debate tactics in South Korea. Then he went on to Georgetown law. “He was a bright young man,” the school said in a statement Monday, “full of potential.”

The Los Angeles former classmate, who spoke on the condition of anonymity to guard his privacy, described Gupta as quiet but friendly. “He never put anyone down,” the classmate said. “But you never heard too much from him. He was not that big of a talker.”

“He’s an outstanding young man who has pursued his education with excellence,” said Reginald W. Bours III, a Rockville defense attorney, who plans to represent Gupta at a bond review hearing Tuesday.

Bours declined to talk about the specifics of the case. He said that after Gupta obtained an undergraduate degree in biomedical engineering from George Washington, he obtained a master’s degree in physiology from Georgetown .

Jennifer Jenkins contributed to this report.