A judge was forced to delay the sentencing of a man convicted of murdering his ex-girlfriend after he was wheeled into court violently shaking and foaming at the mouth.

Father-of-one Joseph Merlino III was set to be sentenced in a Virginia Beach court for injecting Ellie Tran, the mother of his three-year-old daughter, with cyanide and killing her in 2017.

But he was unresponsive when he arrived in the wheelchair for the hearing on Wednesday and was rocking from side to side, prompting Judge Les Lilley to delay his sentencing until Monday.

A jail doctor said Merlino might be suffering from a mental condition caused by stress, the Virginia Pilot reported. 

Prosecutors even asked whether was exaggerating or feigning illness to avoid hearing his fate, which is set to be a life sentence. 

Merlino was said to have started showing signs that he was sick around 8am, a jail deputy told WTRK. 

‘This came out of nowhere,’ Assistant Commonwealth’s Attorney Mario Lorello said. ‘We didn’t find out about it until this morning.’ 

A jury convicted Merlino of first-degree murder in June for killing Vietnam native Tran in 2017. 

He gave Tran the fatal dose while the pair were locked in a bitter custody battle over their daughter, who was two years old at the time, and while Merlino was messaging a new girlfriend in China. 

Prosecutors said the legal battle of the child was likely Merlino’s motive. 

Merlino had gone on a hunger strike in jail around two months before his trial began and lost about 40 pounds. 

The strike ended shortly after the trial, on July 4.

Since then he hadn’t shown any signs of problems, officials claimed. 

He even spoke to WTKR last week, saying he was in good spirits and planned to appeal his murder conviction.

‘He hasn’t been on meal monitoring for quite some time,’ jail spokeswoman Kathy Hieatt added.

Merlino attacked the 35-year-old Tran on February 14, 2017, while she was pulling into her driveway. 

As she was walking to the front door, Merlino grabbed her and injected with cyanide. 

Tran was declared brain dead a few hours later and died the next day. 

Security cameras Tran installed because she was scared of Merlino caught his vile act,.  

She put the devices in place because he had previously tried breaking into her home and  terrified her children.

Tran’s mother said she saw Merlino across the street, just moments after the attack.

She also was the one who identified him in the video shown in court. 

Prosecutors also found that Merlino had used his computer to look up searches related to cyanide, three weeks before his attack. 

A FBI cryptanalyst also testified about the defendant’s use of code in letters to his girlfriend in China. 

The letters included instructions on how to create a fake web alibi for him.

Merlino claimed that he was 150 miles away at the time of the murder. 

Prosecutors have recommended that he get life in prison when he is sentenced on Monday.