A Portland man accused of fatally shooting another man in the head in November and then fleeing to Minnesota appeared in court Thursday for the first time since being brought back to Maine to face a murder charge.

Abdirahman Huessin Haji-Hassan, 24, pleaded not guilty to the charge during a brief hearing at the Cumberland County Courthouse in Portland. Justice Nancy Mills ordered him held without bail.

Haji-Hassan has been in custody since his arrest in Minneapolis on Dec. 19 on a warrant obtained by Portland police charging him with the willful and intentional murder of 23-year-old Richard Lobor. Haji-Hassan appeared in a Minnesota court after his arrest and agreed to return to Maine to face the murder charge, according to Deputy Attorney General Lisa Marchese, who is prosecuting the case.

Haji-Hassan is accused of shooting Lobor during a dispute at 214 Brighton Ave. on Nov. 21, when Lobor stepped between Haji-Hassan and another man to break up a dispute. Haji-Hassan shot Lobor once in the leg and once in the head, according to a Portland police affidavit filed with the court just days after the shooting. The affidavit by Detective Maryann Bailey remained impounded by a judge’s order until after Thursday’s hearing.

Bailey said in the affidavit that the tenant at 214 Brighton Ave. knew Haji-Hassan, Lobor and two other men who were in the apartment at the time of the shooting only by their nicknames. He allowed them to use his apartment for parties and gave them rides in exchange for “beverages, food and crack cocaine,” Bailey said in the affidavit.

The tenant, Michael Deblois, knew the men in his apartment only as “Fresh,” “Dreads,” “New York” and “Jordan.” Police subsequently identified Fresh as Lobor, Jordan as Haji-Hassan and Dreads as 28-year-old Mohamed Ashkir. Police had been unable to determine the identity of the man called New York by the time Bailey filed the affidavit with the court on Nov. 25 seeking a warrant for Haji-Hassan’s arrest.

The tenant told police he came into the living room while Haji-Hassan and Ashkir were arguing in a foreign language as Haji-Hassan was pointing a silver .357-caliber revolver at Ashkir, according to the affidavit.

“Jordan was moving the revolver up and down and counting. He was telling Dreads to leave the apartment,” Bailey wrote. “Fresh moved in between Dreads and Jordan to mediate the situation.”

Haji-Hassan’s attorney, Molly Butler Bailey, said her client spent the past 10 days being driven back to Maine in the back of a van before arriving Wednesday night at the Cumberland County Jail in Portland, where he is being held.

Haji-Hassan said little during the court appearance, answering yes and no questions posed to him by the judge and saying, “that’s fine,” when the judge asked him if she had pronounced his name correctly. He wore the yellow jail uniform of a maximum-security inmate, with the collar of his shirt turned up and a blue jacket with “CCJ” on the back. His hands were cuffed in front of him, and his ankles were shackled over his orange socks.

Lobor’s parents, Robert Lobor and Christina Marring, sat quietly throughout the proceeding in the spectator section of the courtroom, whispering occasionally with a victim-witness advocate who explained the technical aspects of the court proceeding.

Marchese asked that the court hold a hearing to determine whether Haji-Hassan could be held without bail, but Haji-Hassan’s attorney said her client waived his right to have the hearing within the legally required five days after his initial court appearance. Bailey, who is not related to the detective on the case, said after the hearing that she has not seen all the state’s evidence against Haji-Hassan and would consider requesting the hearing after that.

A Cumberland County grand jury indicted Haji-Hassan on the murder charge last week while he was still in transit from Minnesota.

Haji-Hassan, of 133 Eben Hill Road, has an adult criminal record dating to 2009. His previous convictions include a bail violation in 2009, disorderly conduct in 2010, theft in 2011 for which he was sent to jail for 90 days, and another theft in 2013, according to a Maine State Bureau of Identification database. Haji-Hassan is sometimes referred to in those records as Abdi Hassan.

Deblois told police that Haji-Hassan had been drinking rum before shooting Lobor. Crime scene investigators found Haji-Hassan’s fingerprints on a rum bottle, soda cans and a cup in Deblois’ apartment, Detective Bailey wrote in her affidavit.

Portland police had also been to Deblois’ apartment a week before the fatal shooting on Nov. 14 for a reported drug overdose of a female visitor. Deblois told officers who arrived that Fresh had also been at the apartment during the overdose. The woman who overdosed survived, according to a Portland police report of that incident.

Police noted in both the homicide affidavit and overdose report that Deblois is a diagnosed schizophenic.

At the time of Lobor’s death, he was unarmed and had a baggie in his pants pocket containing about an ounce of crack cocaine, according to the detective’s affidavit.

Lobor was 12 when he and his family arrived in Portland as refugees from war-torn Sudan. The eldest of six children, Lobor lived in the family home in Portland’s Munjoy Hill at the time of his death.

The Lobor family were Christians in the predominantly Muslim East African nation, and left Sudan at the height of political strife during that country’s second civil war.

Lobor began getting into trouble with the law not long after he arrived. He had multiple juvenile offenses on his record that led to his commitment to the Long Creek Youth Development Center for juvenile offenders in September 2007 when he was 16.

He was charged with the armed robbery of a convenience store in Portland with a loaded handgun in his waistband when he was 17, leading ultimately to his spending most of his adult life in prison.

Lobor was killed during his longest stint of freedom as an adult since being released from Maine State Prison on the robbery charge on July 3.