SPRINGFIELD - Carlos Bastos said Wednesday he gave a gun to an angry and drunken Daniel Monteiro and that gun was used to kill 18-year-old James Rosario Jr. at a party at Rosario's home.

Monteiro, 23, of Brockton, pleaded guilty Friday in Hampden Superior Court to second-degree murder, admitting he shot Rosario.

Bastos, 23, of Brockton, pleaded guilty to involuntary manslaughter and was sentenced to 12 to 15 years in state prison.

Under the plea agreement between prosecution and defense, Bastos will serve that concurrently with a 10 year sentence he is serving from Plymouth Superior Court for illegal possession of ammunition.

Assistant District Attorney Matthew J. Shea said Rosario was acting as a peacemaker outside his party in the early morning of July 9, 2011, when he intervened when Monteiro, who he didn’t know, had an altercation with other people.

Just as they did Friday at Monteiro’s guilty plea, Julia Calderon, the victim’s mother, and James Rosario, the victim’s father, told Judge Tina S. Page they have suffered an immeasurable loss.

Shea said Bastos’s pleaded guilty to voluntary manslaughter because in giving the gun to Monteiro, he created a situation in which a reasonable person could know there was a strong likelihood death would occur.

Calderon said she believes Bastos, who contributed to Rosario’s death, is just as guilty as Monteiro, the man who fired the shot.

Rosario said he has sought help to deal with his son’s death. “It was taking over my life. It was taking over everything,” he said, saying he keeps asking “why him?" about his son’s murder.

Shea said, “It was a situation destined for tragedy once the decision was made to carry that firearm that night.”

After defense lawyer Edward B. Fogarty asked Page if it was OK, Bastos told Page he apologizes to the family and is sorry about what happened.