The Service of Hope, held in Westminster Abbey, close to where the attack took place on 22 March, celebrated the lives of those killed during terrorist Khalid Masood rampage and the unity of Londoners in the aftermath.
Home Secretary Amber Rudd, Metropolitan Police Acting Commissioner Craig Mackey and London Mayor Sadiq Khan were also among the congregation.
The BBC reported that the Dean of Westminster, the Very Reverend John Hall, praised the response of the people of London to the attack.
He highlighted the actions of those who gathered in Trafalgar Square and those - mainly Muslim women - who gathered in a chain on Westminster Bridge to show their solidarity in the wake of the attack.
According to the Mirror, he told the congregation: “We are all affected by the attack a fortnight ago on Westminster Bridge and at the gates of the Palace of Westminster, and we are all left bewildered and disturbed.
“But our sense of loss and diminishment is paled by comparison with that of the families of those who died: Aysha Frade, Kurt Cochran and Leslie Rhodes on the bridge, and Police Constable Keith Palmer on duty at the gates of Parliament, and all those who were injured.
“Our hearts go out to them in sympathy and prayer and love.”
Prince William read the parable of the Good Samaritan, while Sadiq Khan recited a Muslim prayer.
The national anthem was also sung and candles lit.
A number of those injured in the incident also attended, including the wife of one of the victims.
Melissa Cochran, who husband Kurt was killed by Masood as he ploughed into pedestrians on the pavement of Westminster Bridge, was among those to attend.
Representatives from all the major faith groups were also present.