The boyfriend of a pregnant 18-year-old woman smirked and posed for an apartment building security camera before brutally beating her, causing her to miscarry, according to a complaint filed against the man.

The Minnesota man was charged with second-degree murder on Tuesday in the death of his girlfriend's unborn child, marking rare use of a state law that allows a murder charge even though the mother survived. The couple also has a 6-month-old child together.

Dino M. Scott, 20, smirked and made an obscene gesture on camera before he beat Namrata Ceisel on Sunday, the criminal complaint alleged. She later suffered a miscarriage.

Scott was charged with murder of an unborn child in the second degree, plus third-degree assault.

According to the complaint, the security video shows that both Scott and the victim got on an elevator at building just after 7 a.m. Sunday.

"Mr. Scott smirks at the camera and displays his middle index finger extended and points at the camera," the complaint said.

Scott them began assaulting the victim, the complaint said.

"For 20 seconds he continually punches and kicks Ms. Ceisel until she appears to be knocked unconscious. Mr. Scott can be seen dragging Ms. Ceisel's limp body off the elevator by one arm."

About a minute later, the complaint said, Scott reappeared in the elevator and began cleaning her blood off the walls.

"He obviously knew the camera was there," Ramsey County Attorney Susan Gaertner said. "He obviously assumed the camera was working. He went ahead and brutally assaulted his girlfriend anyway. That's very brazen — and despicable."

Police weren't immediately able to confirmed whether Scott fathered the unborn baby.

Scott was being held in the Ramsey County jail, with bail set at $250,000.

The Associated Press contributed to this report.