Hazrat Mirza Masroor Ahmad, the Caliph of the Ahmadiyya Muslim Community (AMC), said his "heartfelt sympathies" were with the victims.
He was speaking at a Peace Symposium held at the Baitul Futuh Mosque in Morden, south London on Saturday.
Five people died and 50 were hurt outside Parliament, last Wednesday.
In a message Prime Minister Theresa May praised the conference, which she called "an annual reminder of your community's commitment to promoting peace".
MPs Paul Scully and Siobhan McDonagh were among the hundreds who attended the event at the UK's largest mosque.
The caliph described the attack in central London a "barbaric atrocity".
"No matter what terrorists may claim, under no circumstances are indiscriminate acts, or killings ever justified," he said.
He added that Muslims and non-Muslims "must stand up against all forms of oppression, hatred and use all our capabilities to try and foster peace in the world."
Three people were killed in Wednesday's attack when Khalid Masood drove his car into pedestrians on Westminster Bridge, before stabbing to death unarmed PC Keith Palmer.
Masood was then shot dead by police.
The world leader of millions of Muslims has condemned the Westminster terror attack calling it an "affront to the teachings of Islam".