JUST BEFORE sunset last night in the old basilica in Baltimore, with the nation still shattered by ungodly acts of terrorism, an imam sat next to a cardinal who sat next to a rabbi, and they prayed for peace and healing in the face of terror and hate. They did the difficult thing that people expect of them - they tried to use words to restore hope in a week that tested a believer's faith in a merciful God.

The beauty lay in the diversity of the voices, the religions - two millenniums of differences dashed by shared beliefs in justice and peace.

The Muslim said: "I pray Allah, the compassionate, the merciful, our loving lord, to comfort the hearts of the victims and their families with his divine peace and presence."

The Catholic said: "Almighty and merciful God, give us peace in our day."

The Jew said: "Adonai Oz l'mo yiten adonai yivarekh at amo vashalom. May God give us strength, but may he bless all his people with peace."

The imam wore a white headdress and a cream-colored robe, the cardinal his black cassock and red sash, the rabbi a suit and yarmulke. Joined by several other clergy, they sat in the grand sanctuary before a congregation of men and women - and one talkative baby - who had come off the street at rush hour, seeking sanctuary from the crush of news in the aftermath of the terrorist attacks in New York and Washington.

The mayor of Baltimore, Martin O'Malley, sat with two of his children in a front pew.

"Today we're less certain of our future than we were just a week ago," said Zaiman. "Torn by violence, we grieve for the loss of life and destruction that has invaded our home."

The rabbi spoke at a lectern, two large candles to each side. He spoke off notecards, his sermon inspired by a prayer for healing written by a New Jersey colleague, Rabbi Mark Greenspan.

"As Americans we have been fortunate to live far from the violence that others take for granted. America has been a safe haven. We now know that we can no longer live with that illusion. Today we must band together and be vigilant in the fight against terror.

"Shall we succumb to our rage, O Lord?" the rabbi asked. "Shall we allow anger to overcome sense and tears to overtake truth? Shall we become victims a second time by allowing ourselves to hate as much as those who commit such atrocities?

"Protect us, oh Lord, from ourselves, and save us from our anger. ... May we destroy terror, but may we avoid hatred and prejudice in our search for justice."

Keeler made this same appeal. He said something a lot of angry Americans might not want to hear: "This is a time for justice, yes, but not for vengeance."

America, he said, would lose its soul if it succumbed to the same hatred that infests terrorists. "Terrorists can kill the body," Keeler said, "but they must not kill the soul, the spirit of our land."

The rabbi said: "Our hearts go out to all the victims of terror. Heal the wounds which pain us, oh Lord, save us from ourselves and help us to be human beings where our humanity is called for. Give us the strength to stop the bleeding which threatens our world."

Then it was the imam's turn. He spoke in a light but firm voice, gently accented. In this week when extremists of the Muslim world appeared to rise to the skies to commit atrocities against Americans, here was a peaceful man named Arafat, who praised America.

"Whether we like it or not," he said, "we are one family despite the different colors and religions. ... Muslims, Christians and Jews are members of the Abrahamic family. Unfortunately, inside this family we have some extremists, who are painting the face of religion very darkly, a phenomenon that we are all suffering from.

"Down the road, that extremism changes to terrorism. Our lord does not approve of us killing one another. Instead we need to love and help one another."

"In a world changing to a global village," he said, "we have no choice but to meet and dialogue in order to know one another better.

"Muslims in America are part of the American fabric. We are very much hurt by this type of activity, like everyone else. We choose to come to America and make it our home. The religious freedom we experience in America is something we cherish and we should all work to protect it.

"We have to remember that being a superpower comes with great responsibility. That's why it is more necessary than ever for the religious leaders of Muslims, Christians and Jews to join hands and stand together for peace and global justice.

"Men of religion have to stand up and take their role without letting people use religion for their own agendas. ... We should not let extremism and fanaticism prevail."

His voice seemed softer still, a whisper against the roar of the extremism that begets terrorism. You thought for a moment of all the destruction and death in New York and Washington, and wondered how such righteous ideas, offered in this old basilica, could ever win the day. You seemed, at that moment, at the line between faith and despair. You went, at that moment, with faith.

"Metal and steel may be shaken," the imam said. "But our love to God and the solidarity among the believers should grow stronger."