Khairi Saadallah, 25, did not enter a plea to charges of murder and attempted murder during a hearing at Westminster Magistrates Court on Monday.
Prosecutor Jan Newbold told the court: “At the time of the incident, the defendant was heard to shout words to the effect of ‘Allahu akbar’.”
Mr Saadallah, of Basingstoke Road in Reading, has been charged with three counts of murder and three counts of attempted murder over the incident on 20 June.
He appeared by video link from Coventry Magistrates Court, wearing a prison-issue tracksuit and blue face-mask.
Mr Saadallah stood in the dock to confirm his name, date of birth and that he lived in Reading.
The chief magistrate, Emma Arbuthnot, remanded him in custody ahead of a hearing at the Old Bailey on Wednesday.
He is accused of murdering James Furlong, 36, David Wails, 49, and Joseph Ritchie-Bennett, 39, with a large kitchen knife in Forbury Gardens.
Mr Furlong, who was a history teacher, and Mr Ritchie-Bennett, a US citizen, were each stabbed once in the neck, while Mr Wails, a scientist, was stabbed once in his back, the court heard.
All three men were declared dead at the scene.
Mr Saadallah is also charged with attempting to murder their friend Stephen Young, as well as two other men – Patrick Edwards and Nishit Nisudan – who were sat in a separate group nearby, during an attack lasting less than two minutes.
The court heard that Mr Young needed 28 stitches for a head wound, while Mr Edwards was stabbed in the back and Mr Nisudan suffered wounds to his face and hand. They have all since been discharged from hospital.
Additional reporting by PA
Register for free to continue reading
Registration is a free and easy way to support our truly independent journalism
By registering, you will also enjoy limited access to Premium articles, exclusive newsletters, commenting, and virtual events with our leading journalists
Already have an account? sign in