The boy died in 2014 and Rivas pleaded guilty to murder last month

When Juan Concha refused her demand she

Veronica Rivas has already served two years of her 21-year sentence after being arrested in September 2014

A Californian woman was sentenced to 21 years to life in prison for intentionally drowning her toddler son after learning that she would have to split custody of the boy with his father.

Veronica Rivas, 30, of Oceanside pleaded guilty to second degree murder and willful cruelty to a child three weeks before Friday's trial.

Rivas drowned 21-month-old Elijah in the bathtub of her family's condo amidst a protracted dispute over the custody of the boy.

Authorities understand that the woman placed Eljiah underwater until he stopped fighting and then raised his head out of the water allowing him to regain consciousness.

Rivas then called the child's father, Marine Sgt. Juan Concha, demanding him to give up custody of the boy.

When he said no she proceeded to drown the boy, prosecutors said.

Elijah was drowned by his mother in September in 2014 aged just 21-months over a protracted custody dispute with the boys' father

In court, Concha, 30, addressed Rivas as she held onto her son's stuffed blue elephant doll.

'Remember this?' the 30-year-old asked her. 'How do you kill a two-year-old? How do you hold Elijah's head underwater?'

He told Rivas that 'young, innocent Elijah didn't do anything to you'.

'I hope you think about it every night and every morning,' he added.

Concha also said he should be preparing to celebrate the boy's fourth birthday in November.

'How do you kill a kid?' Concha again asked. 'How do you hold Elijah's head underwater not once, but twice? Do you even care?'

Shrine: A makeshift shrine with a yellow teddy bear and a bouquet of flowers was set up outside the house

Deputy District Attorney Claudia Grasso told Judge Richard Monroy that Elijah was killed out of 'revenge and spite'.

'From the beginning, this baby was a pawn to her that she used to get back at Mr. Concha,' Grasso said.

'The minute he moved on… she would not allow him to see the baby.'

Drowned: Toddler Elijah Rivas would have been four this November. 'How do you kill a two-year-old?' his father asked Veronica Rivas

Rivas accused Concha of abusing the boy five days after he formally asked for custody of the child.

However after an investigation by three agencies, including Oceanside police and child social workers, the claim was dismissed as no evidence had been found.

The day after she learned she would have to share custody of her child Rivas killed him.

Grasso said Rivas poured herself a drink before filling up the bath tub upstairs as the toddler played in his diaper.

Despite his young age Grasso said Elijah 'was a sturdy little guy, who fought, who struggled'.

Rivas told police 'I had to put him down' for his own protection.

The child's grandmother called 911 after failing to get through to the home.

The police discovered Rivas unconscious in a room downstairs and was rushed to Tri City Medical Center.

She was treated for an emergency, thought to be an attempted suicide according to neighbors, but this has not been confirmed by police.

Detectives arrested Rivas at the hospital on Friday and transferred her to the Oceanside Police Department.

Her family attended Friday's hearing, but did not comment.