Two leaders of far-right group the English Defence League have been charged with obstructing police after allegedly trying to defy a ban on marching to the scene of the murder of soldier Lee Rigby via a major mosque.

Tommy Robinson, whose real name is Stephen Yaxley-Lennon, appeared at Westminster Magistrates' Court on Wednesday and was bailed to return on September 11. His co-leader Kevin Carroll was also charged after answering police bail and will appear in court on the same day.

The pair were arrested on suspicion of obstructing officers outside Aldgate East Tube station in east London on June 29.

They were attempting to stage what they claimed was a charity walk to Woolwich Barracks in south east London via the East London Mosque, in breach of police restrictions put in place to avoid "serious public disorder and serious disruption to the life of the community".

The force said it had offered two alternative routes that avoided Tower Hamlets, home to the mosque, and had warned that anyone who tried to march to Woolwich would face arrest.

As well as planning to lay flowers in memory of Fusilier Rigby in Woolwich on Armed Forces Day, Robinson and Carroll said they were also walking to raise money for a young girl who has neuroblastoma, a cancer that develops from nerve cells. In a video posted on YouTube, the pair, both wearing T-shirts featuring a photo of a young girl, can be seen arguing with police as they are arrested. Robinson, also wearing Union Flag shorts, tells officers: "You are enforcing Sharia law."

Scotland Yard said officers had decided to remand Yaxley-Lennon, 30, from Luton in Bedfordshire, in custody when he was charged to allow magistrates to decide on bail conditions.

A spokesman said: "Decisions around bail conditions are made on a case-by-case basis dependent on the nature of the offence committed and the likelihood of the person charged adhering to those conditions. On this occasion officers made the decision to remand him in custody to appear immediately at Westminster Magistrates' Court to allow them to make a decision as to the suitability of police proposed bail conditions."

The conditions were upheld and he was released.

Carroll, 44, also from Luton, answered police bail later in the day and was charged without appearing in court.