NEW YORK — Buddhists, Christians, Jews, Muslims and people of other faiths prayed and sang together in post-election solidarity Wednesday afternoon in New York City, even as the outcome of the hotly contested and polarizing vote was still in doubt.

Gathering outside a church in Manhattan’s Greenwich Village, they stamped their feet on the pavement, sang gospel hymns, looked skyward in prayer and chanted words of hope to the beat of a drum.

“We are here together as we figure out how to make a just and loving democracy — no matter the outcome of this election,” said the Rev. Jacqui Lewis, pastor of Middle Collegiate Church in the East Village.

“We’ve been here before,” Lewis said outside the Judson Memorial Church near Washington Square Park.

“We know how to wait for change; we know how to wait with hope.”

It’s a budding interfaith coalition ritual first held four years ago after Donald Trump was elected president. This year it came against a backdrop of not only the election but also protests over racial injustice and the ongoing coronavirus pandemic that has new cases spiking all across the country.

The group of about 20 broke into a call-and-response led by Lewis, who pumped her right fist in the air. At home, people watched remotely via Zoom and social media.

The Rev. Derrick McQueen of St. James Presbyterian Church in Harlem played a djembe drum and asked the crowd to reflect on the election.

“As we stand here on the precipice of this historic moment, no matter how it works out, we still believe in the power of the people,” McQueen said. “We are the people, and we have the power. So the question I ask you today is, ‘What promises do you stand on today?'”

Around a circle of yellow autumn leaves, participants chalked aspirational words on the street: “peace,” “freedom,” “equity,” “love.”

“I came here because my God is not in Washington D.C, so there’s something higher than this situation. Right now, it’s hope and prayer,” said Keen Berger, 78, a member of Judson Memorial who was wearing a red, white and blue mask with images of Democrats Joe Biden and Kamala Harris and a T-shirt that read: “Loving one another is essential work.”

“I needed something that centers me and moves me forward,” Berger said, “and this is it.”

As Imam Khalid Latif of the Islamic Center at New York University led the group in prayer, the Rev. Chris Long, assistant minister of the Community Church of New York closed his eyes and lifted his palms.

Clad in a kente stole and a T-shirt with the image of George Floyd, Long said the gathering energized him at a difficult moment.

“It lessens the anxiety,” he said. “I’m inspired anew.”