PRESCOTT, Ariz. — The small Arizona town where Kayla Jean Mueller grew up gathered in grief Tuesday upon learning that the 26-year-old aid worker who traveled the world on a quest to help others had died while in the hands of Islamic State militants.

A small memorial on the courthouse plaza in Prescott began to grow rapidly as word spread that Mueller’s death had been confirmed.

In Washington, President Obama pledged to bring Mueller’s captors to justice “no matter how long it takes.”

Muller’s 18-month captivity had largely been kept secret in an effort to save her. The Islamic State group reported Friday that she had died in a recent Jordanian airstrike targeting the militants.

On Tuesday, her parents and U.S. officials confirmed her death, but the Pentagon said she died at the hands of Islamic State itself, not in any airstrike.

“What a fine, fine woman and a tribute to Prescott,” said 15-year resident Tina Nemeth. “It’s just so sad, it really is, and everyone feels exactly the same. It’s a shock it hit Prescott. We’re not that big of a town.”

The former territorial capital of Arizona has only recently begun to recover from a devastating 2013 wildfire that claimed the lives of 19 members of an elite firefighting squad. Stickers featuring the fire crew’s logo and bearing the number “19” are still fixed to vehicles all around town.

The mountain town of 40,000 people resembles a relic of the Old West in many ways, with its colorful downtown saloons and a dirt road leading out of town to where Mueller’s family lives. Its picturesque downtown courthouse lawn is recognizable to outsiders who still recall it as the site of the dramatic martial-arts fight scene in the 1971 film “Billy Jack.”

On Tuesday, that lawn was crammed with members of the media gathered to hear an emotional, often tearful tribute from Mueller’s family and friends.

“All these stories about Kayla, she sounds so extraordinary,” said the Rev. Kathleen Day, who heads the United Christian Ministry at Northern Arizona University, where Mueller attended college.

“What was so extraordinary about Kayla was she did ordinary things to extraordinary measures,” Day continued. “She gave people food. She gave people water.” She even befriended her captors, the minister added, at one point trying to teach them origami.

And she wrote passionately about conditions in war-torn Syria, where she had gone to help refugees.

“Every human being should act. They should stop this violence,” Day said, quoting one of Mueller’s blog posts.

Her aunt Lori Lyon said Mueller accomplished more in her 26 years than most people do in a lifetime, adding that her death had “touched the heart of the world.”

From Jordan, government spokesman Mohammed al-Momani offered his country’s condolences.

The White House said Obama had spoken with Mueller’s parents and offered his prayers..