EastEnders spoilers follow for Thursday’s episode (29 January), which is available to watch now on streaming service BBC iPlayer and hasn’t yet aired on TV.

EastEnders has aired an unexpected twist in Joel Marshall’s dramatic trial, which leads to an outcome that no one saw coming. Joel has been charged with grievous bodily harm, voyeurism and taking indecent images of a child, and various Walford residents have this week been giving evidence.

When Vicki took the stand, the defence tried to blame her for Joel’s brutal attack by drawing on events of the past, and she left the court mid questioning in floods of tears.

In today’s episode, Ross, Zack and Mark were keen for Vicki to resume giving evidence, but she insisted she couldn’t continue. Avani found Vicki sitting in the Square, and the teen’s wise words about Joel encouraged her to return to court,

Meanwhile, Joel found out that his dad had refused to come and see him before the next day in court, so he asked to see Tommy instead. Tommy showed up, with Kat and Alfie in tow, and he finally stood up to Joel, urging him to see the error of his ways.

joel, eastenders

BBC

Related: Best streaming services

“I don’t need to make anyone else feel small to make myself feel bigger,” Tommy said. “And if that’s what makes you feel strong, then that ain’t being a man. You talk so much about men needing to be tough, but you can’t even stand up and say what you’ve done.”

Vicki turned up to court in time and continued bravely and confidently giving evidence, this time refusing to be broken by the defence’s questions.

Avani then gave evidence about how Joel filmed them having sex, but she flew into a rage when she noticed Joel talking and laughing while she was on the stand.

joel, ross, eastenders

BBC

Related: EastEnders reveals Nigel and Julie wedding joy – with an emotional twist

After this, Joel himself began giving evidence, but when he started talking badly about Vicki again, Ross spoke up against his son and defended his partner.

As a result of Ross’s outburst, Joel asked to speak to his brief – and the court later discovered that he had changed his plea to guilty on all three charges.

When Ross visited Joel afterwards, the teen broke down in tears and apologised for everything, and the father and son shared an emotional embrace.

vicki fowler, priya nandra hart, eastenders

BBC

Related: 10 huge EastEnders spoilers for next week

Meanwhile, everyone gathered at The Vic after court, but when Mark spoke gleefully about Joel going to prison, Vicki hit back and made it clear that Joel is not evil, but rather a lost and confused boy.

Zack then confronted Vicki about their feelings for one another after they slept together earlier in the week, but Vicki insisted that she loves Ross – and pledged to stand by her partner after he defended her in court.

But are things really over between Vicki and Zack?

EastEnders airs on Mondays – Thursdays at 7.30pm on BBC One. The show also streams on BBC iPlayer, where most episodes drop early at 6am ahead of their TV broadcast.

Read more EastEnders spoilers on our dedicated homepage

For exclusive soap star interviews, gossip, spoilers and theories every week, don’t miss the Soap Scoop podcast from Inside Soap magazine. The latest episode delves into next week’s soap spoilers, from Moira’s arrest in Emmerdale, to Nigel and Julie’s wedding in EastEnders.