Sometime after Kayla Mueller was taken hostage by the Islamic State, a man arrived at the Syrian terrorist camp where she was being held. The envoy told the militants that he was the Prescott woman's husband and demanded her release.

But Mueller, the 26-year-old aid worker kidnapped 18 months ago, denied being anyone's wife. Mueller wasn't in on the ruse, said U.S. Rep. Paul Gosar, R-Ariz., whose district includes the Mueller family's home. Unknowingly, she had foiled a chance at freedom.

The maneuver was one in a series of failed attempts to liberate Mueller, Gosar said, efforts that reached across thousands of miles into a chaotic war zone where ISIS has killed at least three Americans and numerous other aid workers and journalists in brutal displays of violence.

But the efforts were frustrating and ultimately futile, he said.

Mueller's family wrote a letter to President Barack Obama asking him to approve a prisoner swap. Sen. John McCain flew to meet with heads of state across the region. One of Gosar's aides, as a last-ditch move, traveled to a Syrian refugee camp in Turkey to search for leads.

Gosar, who has been in touch with the family and briefed by the State Department since the beginning, said at times the agency's response appeared anemic and U.S. intelligence was spotty. But at least one report indicates some American military rescue plans were vetoed by Mueller's parents as too risky.

ISIS claimed Friday that Mueller had died in a Jordanian air raid. U.S. and Jordanian officials cast doubt upon that claim. Mueller's family announced Tuesday that they had received proof Mueller was dead. White House spokesman Josh Earnest said the family received a private message from ISIS but it did not provide a clear indication of when and how Mueller died. Earnest said the Islamic State's claim that Mueller died in an airstrike on an ISIS weapons depot near Raqqa, Syria, coordinated by the U.S. and Jordan, did not appear credible.

Gosar said Arizona officials, including Sen. John McCain, and Mueller's parents had tried everything they could think of.

Gosar and McCain spoke to The Arizona Republic at length about the efforts to free Mueller before her death was confirmed. The newspaper delayed publishing those accounts in response to pleas from a family spokeswoman that if Mueller were still alive, publicizing them could endanger her.

“We racked our brains trying to figure out what else we could do. We’re half a world away with very limited resources. ... Finding a way to solve a problem is limited even for a member of Congress.”

U.S. Rep. Paul Gosar, R-Ariz

"We racked our brains trying to figure out what else we could do," Gosar said. "We're half a world away with very limited resources. ... Finding a way to solve a problem is limited even for a member of Congress."

McCain said on Monday, "I feel in a way that I've failed them, because of what apparently has happened."

Obama opened up for the first time about Mueller and attempts to rescue her Tuesday, after White House officials had initially declined to comment.

The United States spared no resources in seeking to save Mueller, Obama told Buzzfeed in a previously scheduled interview.

"I don't think it's accurate to say the United States government hasn't done everything we could," the president said. "We devoted enormous resources, and have always devoted enormous resources, to freeing captives or hostages anywhere in the world."

Asking for help

Mueller was kidnapped by ISIS in August 2013 after leaving a hospital in Aleppo, Syria.

The Spanish Doctors Without Borders humanitarian group said, in a statement, she did not work with their group but had arrived there with a contractor.

"A technician sent by a company contracted (by Doctors Without Borders) ... arrived at one of the organization's structures in Aleppo, Syria to perform repairs," the statement said. "Unbeknownst to the (Doctors Without Borders) team, Kayla, a friend of the technician's, was accompanying him. Because additional time was required to carry out the repair work, the technician and Kayla were harbored overnight at the (Doctors Without Borders) hospital in Aleppo, due to safety concerns.

"Upon completion of the repair work on August 4, the (Doctors Without Borders) team organized transportation for Kayla and the technician to the Aleppo bus station, from where they were to depart for Turkey. Kayla's detention occurred during the drive to the bus station."

Mueller's family said in a statement Friday that she was leaving the hospital when she was taken. A family friend said one of the border aid groups Mueller had worked with was the first to inform her family of the kidnapping.

Soon after, father Carl Mueller approached a small group of Arizona officials for help, insisting on complete confidentiality.

He was put in touch with Gosar and McCain, the senior member of Arizona's delegation who earlier in 2013 had made a surprise visit to Syria to meet with members of the Free Syrian Army fighting President Bashar Assad's government in the country's bloody civil war.

Posted!

A link has been posted to your Facebook feed.

Members of the community gather at a candlelight vigil for Kayla Mueller at the NAU Lutheran Campus Ministry February 14, 205 in Flagstaff, Arizona. Mueller died whilst being held prisoner by ISIS in the middle east. Dominic Valente/The Republic, Dominic Valente/The Republic

Members of the community gather at a candlelight vigil for Kayla Mueller at the NAU Lutheran Campus Ministry February 14, 205 in Flagstaff, Arizona. Mueller died whilst being held prisoner by ISIS in the middle east. Dominic Valente/The Republic, Dominic Valente/The Republic

Members of the community gather at a candlelight vigil for Kayla Mueller at the NAU Lutheran Campus Ministry February 14, 205 in Flagstaff, Arizona. Mueller died whilst being held prisoner by ISIS in the middle east. Dominic Valente/The Republic, Dominic Valente/The Republic

Members of the community gather at a candlelight vigil for Kayla Mueller at the NAU Lutheran Campus Ministry February 14, 205 in Flagstaff, Arizona. Mueller died whilst being held prisoner by ISIS in the middle east. Dominic Valente/The Republic, Dominic Valente/The Republic

Members of the community gather at a candlelight vigil for Kayla Mueller at the NAU Lutheran Campus Ministry February 14, 205 in Flagstaff, Arizona. Mueller died whilst being held prisoner by ISIS in the middle east. Dominic Valente/The Republic, Dominic Valente/The Republic

Members of the community gather at a candlelight vigil for Kayla Mueller at the NAU Lutheran Campus Ministry February 14, 205 in Flagstaff, Arizona. Mueller died whilst being held prisoner by ISIS in the middle east. Dominic Valente/The Republic, Dominic Valente/The Republic

Members of the community gather at a candlelight vigil for Kayla Mueller at the NAU Lutheran Campus Ministry February 14, 205 in Flagstaff, Arizona. Mueller died whilst being held prisoner by ISIS in the middle east. Dominic Valente/The Republic, Dominic Valente/The Republic

Members of the community gather at a candlelight vigil for Kayla Mueller at the NAU Lutheran Campus Ministry February 14, 205 in Flagstaff, Arizona. Mueller died whilst being held prisoner by ISIS in the middle east. Dominic Valente/The Republic, Dominic Valente/The Republic

Kayla Mueller volunteered at Food for Life Vrindavan in 2010. According to the group's website, Food for Life Vrindavan is a humanitarian aid organization that for the last 10 years has worked in the poorest villages in the Vrindavan area south of New Delhi. Food for Life Vrindavan

Kayla Mueller volunteered at Food for Life Vrindavan in 2010. According to the group's website, Food for Life Vrindavan is a humanitarian aid organization that for the last 10 years has worked in the poorest villages in the Vrindavan area south of New Delhi. Food for Life Vrindavan

Kayla Mueller volunteered at Food for Life Vrindavan in 2010. According to the group's website, Food for Life Vrindavan is a humanitarian aid organization that for the last 10 years has worked in the poorest villages in the Vrindavan area south of New Delhi. Food for Life Vrindavan

Meg Moyer, 9, and her father, Kip Moyer, look at a temporary memorial for Kayla Mueller at the Campus Ministry Center at Northern Arizona University Wednesday, Feb. 11, 2015. Mueller attended the center while a student at NAU in Flagstaff. Tom Tingle/The Republic

A temporary memorial for Kayla Mueller lights up the Campus Ministry Center at Northern Arizona University Wednesday, Feb. 11, 2015. Mueller attended the center while a student at NAU in Flagstaff. Tom Tingle/The Republic

Mary Ellen Halvorson, Director at Tri-City Prep High School is overcome with emotion as she looks at photos of Kayla Mueller from her 2007 senior yearbook on Wednesday, Feb. 11, 2015 in Prescott, AZ. The White House confirmed Tuesday the death of American aid worker Kayla Mueller, 26, from Prescott, AZ, four days after Islamic State militants claimed she had been killed by Jordanian airstrikes in Syria. (Rob Schumacher-The Arizona Republic) Rob Schumacher/The Republic

Molly Hock, 26, who was a roommate with Kayla Mueller at Northern Arizona University, talks about her friend and how much she will miss her. Hock's boyfriend, Kyle NIxon, 31, lends support as the two sit outside the Campus Ministry Center in Flagstaff, reminiscing about Mueller, Wednesday, February 11, 2015. Tom Tingle/The Arizona Republic

A pink cowboy hat rests in the flowers at a small memorial in honor of Kayla Mueller next to Whiskey Row on Wednesday, Feb. 11, 2015 in Prescott, AZ. The White House confirmed Tuesday the death of American aid worker Kayla Mueller, 26, from Prescott, AZ, four days after Islamic State militants claimed she had been killed by Jordanian airstrikes in Syria. (Rob Schumacher-The Arizona Republic) Rob Schumacher/The Republic

Kayla Mueller volunteered at Food for Life Vrindavan in 2010. According to the group's website, Food for Life Vrindavan is a humanitarian aid organization that for the last 10 years has worked in the poorest villages in the Vrindavan area south of New Delhi. Food for Life Vrindavan

Ted Dwyer met Kayla Mueller after lending office space to Flagstaff New Day Peace Center in Flagstaff. Mueller was confirmed dead by her family while a hostage of ISIS Feb. 10, 2015. Michael Chow/The Republic

Peggy Sheldon-Scurlock reflects on her memories of her friend, Kayla Mueller, in her office in Flagstaff Feb. 10, 2015. Mueller was confirmed dead by her family while a hostage of ISIS. Michael Chow/The Republic

Terri Crippes and Lori Lyon (right) cry after reading a family statement about the death of their niece Kayla Mueller during a press conference outside Prescott Court house on Feb. 10, 2015. Nick Oza/The Republic

Kathleen Day, head of United Christian Ministry, reading a family statement about the death of Kayla Mueller during a press conference outside Prescott Court house on Feb. 10, 2015. Nick Oza/The Republic

In this April 28, 2007, photo, high school senior Kayla Mueller marches in a walk in Prescott, Ariz., promoting aid to the Darfur region of Sudan. A statement that appeared on a militant website commonly used by the Islamic State group claimed that Mueller was killed in a Jordanian airstrike on Friday, Feb. 6, 2015, on the outskirts of the northern Syrian city of Raqqa, the militant group's main stronghold. The IS statement could not be independently verified. Prescott Daily Courier, Nathaniel Kastelic) Nathaniel Kastelic/AP

Yavapai County Sheriff law enforcement block the street to the home of the Mueller family in Prescott on February 6, 2015. The family awaits word on fate of ISIS held Ariz. aid worker Kayla Mueller, 26. Cheryl Evans/The Republic

Kevin Morrow (standing L-R), Opinions editor and Vincent Pena, Editor-in-Chief, work the rest of the staff of Northern Arizona University's newspaper, the Lumberjack in the Lumberjack newsroom in Flagstaff, AZ on February 6, 2015. Patrick Breen/The Republic

Zana Alattar, 20, center with other students from The Muslim Liberty Project (MLP) hold a candlelight vigil in honor of victims of ISIS at the Hayden Lawn, ASU Tempe Campus on Monday, Feb. 9,2015. Nick Oza/The Republic

Students from The Muslim Liberty Project (MLP) hold a candlelight vigil at the Hayden Lawn, Arizona State University Tempe Campus in honor of victims of ISIS on Monday, Feb. 9,2015. Nick Oza/The Republic

Friend Andrew Shepherd explains, "Those are the names of the people who died in Guatemala as a result of military violence during he civil war, many in massacres ... I remember Kayla and I having the realization that some of the groups of names were entire families of people who were killed." Andrew Shepherd

McCain, who recently has become chairman of the Senate Armed Services Committee, said he remained in close contact with the Muellers, visiting their home in Prescott and meeting with them in Washington. He personally spoke to Secretary of State John Kerry on behalf of the family.

In an interview with The Republic, McCain detailed his international efforts on behalf of the family. In Erbil, the Iraqi Kurdistan capital, McCain personally met with President Masoud Barzani and stressed the need to secure Mueller's release. In Qatar, McCain discussed her situation with the emir of Qatar and the country's head of intelligence. He tapped his sources at the Syrian National Council and the Free Syrian Army. As recently as last month in Saudi Arabia, McCain raised the issue.

"All of these leaders and intelligence people pledged to me they were doing everything they could," McCain said. "Some few details did emerge from these sources, but obviously not enough."

Searching for help

Gosar said Mueller was captured with another person who was released while Mueller was not.

Later — it's not clear when — either that person or an acquaintance went to the Islamic militants and, in the husband-wife plot, requested they turn over Mueller, Gosar said.

Mueller's "part(n)er, and two other Syrians had also been in the car when they were stopped at a checkpoint by the kidnappers," the story says. "He was detained and then released. After he was freed he did not give up: again at enormous personal risk, he went back into Syria to plead with her kidnappers but to no avail."

Meanwhile, Gosar and his aides were brainstorming what they could do.

Gosar got in touch with a friend from college who had family in Syria, but they were fleeing for their own safety and couldn't help.

In December 2013, Gosar's chief of staff Tom Van Flein was invited on a congressional trip to visit the region.

While there, he met with an experienced State Department official at the U.S. Embassy in Ankara. The official offered little help, Van Flein said, shrugging his shoulders and telling him to deal with the issue in Washington. The response irked the congressman.

"It's just pretty stupid," said Gosar, a Republican who is frequently critical of the Obama administration. "Some folks working in this realm were not really understanding of the situation."

Van Flein, as a final recourse, traveled to a refugee camp in Sanliurfa, Turkey, to search for leads near the Syrian border. But he came up empty-handed.

After Mueller's death, McCain said he wasn't really expecting a further update from the U.S. government.

"Frankly, I learned more from my connections in Qatar and Erbil than I did from the administration," McCain said.

A State Department spokeswoman said the agency had no comment.

Rescue attempts

U.S. officials tried to plan other rescue operations, Gosar said. But each time they got close, militants would move the hostages.

"They thought they knew where they were and before they could implement a plan, (the hostages) would be moved again and separated," Gosar said.

Months into Mueller's detention, her parents said, they first heard directly from ISIS. The militants confirmed their daughter's captivity in May 2014 and provided "proof of life."

Two months later, they received an e-mail that warned Mueller would be executed in a month, according to Carol Thompson, a Northern Arizona University professor who taught Mueller and is close to the family.

Thompson said in July 2014, the extremists told the Muellers that Kayla would be executed in August. The threat was deemed credible by authorities, she said. "It was a very specific one-month deadline," Thompson said.

Kayla Mueller volunteered at Food for Life Vrindavan in 2010. According to the group's website, Food for Life Vrindavan is a humanitarian aid organization that for the last 10 years has worked in the poorest villages in the Vrindavan area south of New Delhi.(Photo: Food for Life Vrindavan)

Though Kayla's fate after that is unclear, ISIS executed American journalist James Foley that August. His beheading was captured in a video distributed by the extremists. Afterward, Thompson said there was a period of silence from Mueller's captors.

Following the Aug. 19 revelation of Foley's murder, U.S. officials revealed a rescue operation had been undertaken but had failed to locate Foley and other hostages.

Only now is it clear that Mueller was a target included in that rescue effort.

Mouaz Moustafa, executive director of the Washington, D.C.-based Syrian Emergency Task Force, said Monday that Mueller was one of the hostages the U.S. had hoped to free. Moustafa accompanied McCain on a May 2013 trip to Syria, before Mueller was captured.

"From the human-network intelligence that we've got, there was an attempt to rescue American hostages, but there was faulty intel when it came to that rescue," said Moustafa, whose organization advocates for U.S. intervention in Syria. "Other than that, I think it has been a very limited effort."

Obama confirmed Tuesday that officials planning the raid last summer believed they could free Mueller along with the other hostages.

"I deployed an entire operation at significant risk to rescue not only her but the other individuals that have been held," he said in the Buzzfeed interview, noting the operation "probably missed them by a day or two."

Diane Foley, mother of James Foley, told ABC News she believes the federal government didn't do enough. Her son briefly taught school in Phoenix before going overseas as a journalist.

"Kayla, along with our son and others were held for nearly two years and there were many opportunities along the way: several times when the captors reached out, several times when returning hostages brought sensitive information," she said. "And yet nothing was done to save our young Americans."

'Bring them to justice'

Gosar said ISIS demanded a ransom of $5 million for Mueller's release. Media reports in August 2014 about an unnamed female ISIS hostage described a ransom of $6.6 million.

United States policy does not allow paying ransoms to terrorists.

Obama said telling parents ransoms can not be paid to groups like ISIS is "as tough as anything I do."

"The reason is: once we start doing that, not only are we financing their slaughter of innocent people and strengthening their organization, but we're actually making Americans even greater targets for future kidnappings," he said Tuesday.

A short time after the ransom demand, Gosar said a State Department official told him ISIS had proposed a prisoner swap. The militants wanted Aafia Siddiqui, an MIT-trained scientist imprisoned in the United States who was accused of working with al-Qaida and convicted of trying to kill Americans.

ISIS had asked for Siddiqui previously, in return for Foley and American journalist Steven Sotloff, whom ISIS murdered in a videotaped beheading released in September.

The Muellers wrote a letter to Obama requesting he approve the swap, Gosar said. It's unclear how the president responded, but Siddiqui was not released.

A family spokeswoman could not confirm a letter was sent. A White House spokesman and a National Security Council spokesman said they could not comment.

“No one can know the agony that they went through, so anything that they tried to do is fully understandable.”

Sen. John McCain, R-Ariz.

"No one can know the agony that they went through, so anything that they tried to do is fully understandable," McCain said of the parents.

In November, Gosar introduced a bill offering $5 million for intelligence leading to the arrest or conviction of foreign terrorists involved in kidnapping and murdering Americans. The legislation made no mention of Mueller, whose identity was still a closely held secret, but noted the murders of Foley, Sotloff, aid worker Peter Kassig and "any other citizen of the United States."

"We need to find these thugs and bring them to justice," Gosar said at the time. "This reward money will give incentive for these terrorists to turn on each other. The first to come to us will be rewarded well so we can bring the others to justice."

A similar bill passed the Senate, but the legislation never went to the House for a vote. Gosar reintroduced the bill Thursday, one day before ISIS claimed Mueller had died in the air attack. The timing was coincidental, he said.

Gosar said his aim is to keep up the pressure on the terrorist organization, for Mueller's sake.

"Maybe this is a way to get good people to do the right thing," Gosar said. "I'm tired of these people existing on the same planet, breathing the same air as I am. They shouldn't be around."