A Brentwood gang member was convicted Friday afternoon of shooting to death a man who had already been beaten into unconsciousness.

Elvi Portillo Aguilar, 27, showed no reaction when a Suffolk County Court jury pronounced him guilty of second-degree murder in the Aug. 18, 2012, death of Edgar Perez Avalos outside a Brentwood sports bar.

Portillo faces 25 years to life in prison when Judge Stephen Braslow sentences him in Riverhead on June 28.

“This was a very straightforward, common-sense type of case,” said Assistant District Attorney Kathleen Kearon. She said a video of Portillo describing the killing in detail to Suffolk homicide detectives was consistent with other evidence in the case.

Jurors said they were initially divided during their 5 1/2 hours of deliberations over two days. But several jurors said the video was important, and not just because of Portillo’s demonstration and description of the crime.

“You could see his demeanor,” one juror said, an apparent reference to Portillo laughing when Det. Tulio Serrata asked him if he intended to kill Perez, 30, by shooting him in the back of the head as he lay on the ground outside Migueleno’s sports bar.

Two other men — like Portillo, members of the MS-13 gang — had already beaten Perez unconscious outside the bar before Portillo got out of a car, walked up to him and shot him, prosecutors said.

Those men pleaded guilty to assault and have since been deported to El Salvador. But they identified a different person as the shooter — information that wasn’t divulged to the defense until the trial began earlier this month.

Defense attorney Craig McElwee of Hauppauge argued that was a violation of what is known as the Brady rule, which generally requires prosecutors to turn over evidence favorable to the defense as soon as they have it. McElwee said if he’d had that information years ago, he could have investigated and prepared a more effective defense.

advertisement | advertise on newsday

“The jurors made a decision on the evidence they were able to view,” McElwee said after the verdict. “It would have been a different result if we’d had the opportunity to develop evidence that wasn’t turned over to us. It cost us the opportunity to gain our client’s freedom.”

McElwee said the Brady rule violation will be the basis of an appeal.

Kearon said there was nothing the defense could have done to get a different result, noting that jurors ultimately heard that Portillo’s co-defendants said a different man was the shooter.

“They heard everything about all of the participants in this trial,” she said.