A 21-year-old man has been sentenced to life in prison for killing a man after losing several rounds of beer pong.

Zachary Rico was convicted of murder and sentenced Friday, his 21st birthday, for shooting 20-year-old Jacob Vidaurri in the head after losing the drinking game.

Zachary Rico (Dallas County jail )

Rico had no criminal history before the October 2016 killing in Grand Prairie.

Zachary Rico posted selfies with his gun to social media

Witnesses testified during last week's trial that Rico was known for flaunting his guns at parties, and hours before the shooting, Rico posted selfies with his gun on Snapchat.

He was also known for losing his temper when he lost at beer pong. The night of the murder, he lost six games to Vidaurri and another person at the party.

Rico showed his gun during the game and even put it on the table to try to scare Vidaurri, prosecutor Jessica Trevizo said.

But Vidaurri was unmoved. He asked whether it was real and told Rico to put the gun away.

Vidaurri's family said he was known for protecting his friends and avoiding violence.

"I feel like he was trying to defuse the situation," said his father, Martin Vidaurri. "Jacob pretty much showed fearlessness."

Jacob Vidaurri (Courtesy photo )

Vidaurri was a die-hard Cowboys fan, and his family and friends wore Cowboys jerseys and shirts to his funeral.

"Jacob's just a really outgoing person. A lot of people gravitated to Jacob," his father said. "He was just the life of the party."

Even after Vidaurri walked away from the drinking game, Rico followed him and kept "taunting," Trevizo said.

At one point, Rico said, "Don't mess with the game."

Rico asked Vidaurri if he was afraid of death. He shrugged it off and said, "If it's my time to go, it's my time to go."

"God's got me," Vidaurri said.

Rico even took the cartridges out of the gun and held it to Vidaurri's head and pulled the trigger.

Later, Rico reloaded the gun, held it to Vidaurri's temple and pulled the trigger again, killing him.

"He would use those guns to get what he wanted," Trevizo said. "And when Jacob didn't give him what he wanted that night, which was, 'Oh, you're a big bad guy,' he pulled the trigger."

After the shooting, Rico hid in a bathroom until police arrived.

Martin Vidaurri said he felt that justice was served with the life sentence but said he felt bad for Rico's family as well.

"Now they're missing a son. The difference is they get to communicate with him," he said. "We'll never get to speak to Jacob. We get to go visit him at a grave site and put flowers down."