A Maryland mom and dad are being blasted online for...

The dad and stepmom under fire for a viral YouTube video pranking their kids lost custody of two of them to their biological mother.

Emergency custody was granted Friday after the Maryland couple, Mike and Heather Martin, shared a video last month of an alarming stunt that made their 9-year-old son Cody burst into tears, according to Mashable.

The controversial video, which has since been removed from YouTube, showed the parents screaming and cursing at their son to convince him he had spilled ink on the carpet.

The “Invisible Ink” stunt quickly became a lightning rod on social media after it was posted to their YouTube channel, which features similar family pranks.

An online petition was started calling on Child Protective Services to investigate the family.

“Mike Martin’s YouTube channel, DaddyOFive, has posted videos that would suggest possible emotional and physical abuse of his children. Mike Martin and his family should be placed under investigation by Child Protective Services to see whether these claims hold true,” the petition stated.

The couple, who is from Damascus, Maryland, defended the prank as harmless, saying the children enjoyed appearing in the videos.

“[What] you see on our YouTube channel is not a reflection of who we are. It’s not,” Heather Martin said in a “Good Morning America” interview. “It’s a character. It was a show, a bad show, but it was a show.”

On Monday, biological mom Rose Hall responded to the prank with a YouTube video of her own, announcing that she had regained custody of Cody and Emma Martin.

Emma, 12, was not involved in the “Invisible Ink” prank, but has been the subject of other videos.

“It was very heartbreaking. It’s disturbing to see my kids abused,” Hall said.

Following the custody order, the Martin family apologized on YouTube for the extreme videos.

“This has been the absolute worst week of our life and we realize we have made some terrible parenting decisions,” Heather Martin said.