A Minnesota woman who accidentally shot and killed her boyfriend in a YouTube stunt gone wrong has been sentenced to 180 days in prison after accepting a plea agreement.

Monalisa Perez, 20, pleaded guilty to second-degree manslaughter in December for killing her 22-year-old boyfriend Pedro Ruiz III last June. She was sentenced on Wednesday, the Star Tribune reported.

Under the plea agreement, Perez is banned for life from possessing a firearm and cannot receive payment for telling her story. She will serve her time in 10-day increments over the next three years.

According to court documents, the couple had prepared the stunt hoping for it to go viral.

Police said the couple set up two cameras outside their Halstad home. Their 3-year-old daughter and almost 30 other people were watching.

For the stunt, Perez, who was pregnant with their second child at the time, fired a shot from a .50-caliber Desert Eagle pistol at Ruiz from a foot away. They both believed a hardcover encyclopedia he held against his chest would shield him.

However, Ruiz was fatally wounded.

"We were doing a YouTube video, and it went wrong," a transcript of the 911 call quoted Perez. "It's all on recording."

Hours before the shooting, Perez spelled out her concern on Twitter.

“Me and Pedro are probably going to shoot one of the most dangerous videos ever. HIS idea not MINE," she wrote.

On Wednesday, Norman County Attorney James Brue told the Star Tribune that he was satisfied that the 180-day jail sentence holds her accountable for “negligence that led to the tragic and completely avoidable death.”

“The reality that this foolish stunt was dreamed up, planned, and executed by Pedro Ruiz, and the defendant wrongfully and tragically relied on his assurances that the stunt was safe,” Brue told the Star Tribune.

Perez, who has since given birth to the couple’s second child, has a YouTube channel with various videos they made involving various stunts and pranks.

The channel remains live and has drawn millions of views since Ruiz’s death.