Two women were allegedly sexually assaulted in the queue to attend the Queen's lying in state, a court has heard.
Adio Adeshine, 19, allegedly exposed himself and pushed into the mourners from behind as they waited in line at Victoria Tower Gardens on Wednesday evening after Westminster Hall opened its doors to the public.
The court was told he entered the River Thames then re-emerged, before police arrested him.
Adeshine appeared at Westminster Magistrates' Court charged with two counts of sexual assault and two counts of breaching a sexual harm prevention order.
Wearing a grey prison-issue tracksuit, he spoke to confirm his name, date of birth and address in Walworth, south-east London, before pleading not guilty to the charges.
Outlining the allegations, prosecutor Alex Adowale, said: "The defendant was part of the queue to see the resting in state of Queen Elizabeth II. "
The court heard the first complainant allegedly noticed Adeshine because she had not previously seen him, despite having waited in the queue with the same people for hours.
She was said to have noticed him getting closer to her before feeling something touching her back, then turned to see he had exposed himself.
The woman later allegedly saw Adeshine acting in a similar way towards another woman, before security were alerted and police called.
Deputy Chief Magistrate Tan Ikram declined to grant Adeshine bail, remanding him in custody.
He will appear at Southwark Crown Court on October 14.