A judge in San Antonio on Monday accepted the murder plea agreement from 22-year-old Steve Ray Villa.
Investigators say the San Antonio man was upset with partygoer Martin Lopez but accidentally shot 19-year-old Grace Guerra. The two men allegedly argued over a nickname for Villa. Lopez was grazed by the bullet.
The San Antonio Express-News reports Guerra tried to break up the dispute, saying the men would wake up her child in another room.
Prosecutors say some people at the party were likely intoxicated.
Villa also agreed to a concurrent 10-year term for punching a jailer while awaiting trial.