Monalisa Perez has been charged with shooting boyfriend Pedro Ruiz in what family say was a YouTube stunt gone wrong YouTube

A Minnesota woman, who shot dead her boyfriend in a YouTube stunt that went horribly wrong, has pleaded guilty at a local court. Monalisa Perez was charged with second-degree manslaughter after a bullet targeted at a book her partner was holding killed him.

The 20-year-old mother of two is expected to be sentenced to 180 days in jail, followed by 10 years of probation. She had allegedly shot her partner Pedro Ruiz with a .50 calibre handgun while performing the stunt aimed at getting record views on their YouTube channel.

Ahead of the stunt on June 26, Ruiz had reportedly instructed Perez, who was seven-months pregnant at the time with their second child, to fire a round at the book he was holding, thinking the pages would stop the bullet.

Local media reports stated that the pair had allegedly practised it earlier with no harm, but things turned fatal when the final act was performed. Ruiz was struck by the bullet in his chest in front of their three-year-old daughter.

Before shooting the video, Perez had tweeted about it, saying, "Me and Pedro are probably going to shoot one of the most dangerous videos ever. HIS idea not MINE."

The botched stunt, which remained live on YouTube for nearly six months after the shooting, gained millions of views on the social media, but as part of her plea deal, Perez could not profit from it. She has also been barred from possessing any firearms, Minneapolis Star-Tribune reported.

As part of the plea agreement with the prosecution, the accused has agreed to serve 180 days in jail in installments of 30 days per year for the next three years to be able to take care of her children. Later, she could be put on electronic home monitoring.

She is expected to appear in court in February 2018 for her sentencing and if found guilty, she faces up to 10 years in prison, the Daily Mail reported.