The literary world can seem like a very secular place. But on Wednesday night, a dozen writers from around the world gathered onstage at a New York University auditorium to send some heartfelt words toward the heavens — or somewhere vaguely in that direction.

“I am not trying to reach some divine/ear,” the poet Brenda Shaughnessy declared at the beginning of her reading. “Imagine. Where once/was mercy trash now crunches/like leaves under stars.”

The event, part of the PEN World Voices Festival and billed as an evening of “Prayer and Meditation,” came off as an ambivalent preamble to the National Day of Prayer, on Thursday, held since 1775. The participants had been invited to write “an original prayer for our times,” however they construed the term.

The Irish novelist Colm Toibin, the festival’s director, who read a prose piece, said the often conflicted results were less about writerly atheism than basic writerly temperament.

“I think disavowing prayer in a session on prayer is part of PEN’s mission of promoting freedom of expression,” he said in an interview. “The first thing you expect writers to say when they get a commission is, is there anything I can do to mess this up?”

Asked if he ever prayed, Mr. Toibin replied, “Only when I’ve lost my keys.” The novelist Rachel Kushner said the question was hard to answer.

“Prayer is so complicated,” she said after the event, during which she read a short story called “La Sagrada Família,” a reference to Gaudi’s cathedral in Barcelona. “I don’t think I could answer yes or no.”

Some of the prayers on offer were political as much as spiritual. The French-Congolese novelist Alain Mabanckou opened with “Somewhere in the World,” a litany of humanity’s never-ending troubles. (“Somewhere in the world/There will always be a candle to light.”) Bob Holman, a former “poetry slam-master” at the Nuyorican Poets Cafe, talk-sang his way through a piece called “The Hammer of Justice,” name-checking Cornel West, Eric Garner and #blacklivesmatter.

Some readers did address their words squarely to the Almighty, even if they struggled to keep a straight face. Sayed Kashua, an Arab-Israeli novelist and journalist known for his humorous newspaper columns in Haaretz, asked God to grant understanding between Israelis and Palestinians and, perhaps more unlikely, to “fix the weather in central Illinois.”

The Haitian-American novelist Edwidge Danticat ended the evening with the imagined last prayer of her mother, who died of cancer in October. “Please let my children remember me,” Ms. Danticat read. “Please let them know that I’ve always been praying for them like this, silently, in my head.”

And another thing: “Please don’t let them throw out my good blender.”

Her voice cracked a few times; the room was perfectly still. “Before I went on stage, I prayed that I wouldn’t start sobbing,” she said afterward. “I put the humorous parts in to help me make it through.”