Story highlights Everything possible had been done to bring James Foley home, Susan Rice told CNN

State Department says it had a close working relationship with the Foleys

Kerry says he was "taken aback -- surprised, I guess, is the word" by Diane Foley's comments

The U.S. government Friday defended its handling of James Foley's case after the slain journalist's mother told CNN that officials suggested the family could be charged if they tried to raise money to free him.

Saying everything possible had been done to bring the journalist home, State Department spokeswoman Marie Harf told reporters officials worked very closely with Foley's family and with his employer, GlobalPost CEO Philip Balboni.

"Any advice that this department or other departments give to the families about what they should do in these situations is based solely on what is best for returning their loved one home, period," Harf said during a sometimes testy exchange with reporters. "Any accusation to the contrary is flatly wrong."

Foley was beheaded in a video made public by ISIS on August 19. ISIS -- the terror group that's taken over large swaths of Syria and Iraq in its quest to create a far-reaching caliphate under its strict version of Sharia law -- took credit for Foley's beheading, saying it was in response to U.S. airstrikes in Iraq.

Prior to Foley's execution, his captors demanded 100 million euros ($132.5 million) in exchange for his release, according to GlobalPost. The U.S.-based online news agency never took the demand seriously because ransoms paid for other hostages held by ISIS were dramatically less, Balboni has said.

JUST WATCHED White House responds to Foley interview Replay More Videos ... MUST WATCH White House responds to Foley interview 05:59

JUST WATCHED Diane Foley: Jim was so loved Replay More Videos ... MUST WATCH Diane Foley: Jim was so loved 08:10

JUST WATCHED Diane Foley: Our country let Jim down Replay More Videos ... MUST WATCH Diane Foley: Our country let Jim down 07:58

Harf cited Balboni's statement regarding the ransom demand, while reiterating that under anti-terrorism laws in the United States it is illegal to negotiate with terrorists, such as ISIS.

"It's part of our job to help the family understand what our laws are about ... " she said. "But this department would never, and did not ever, intend to, nor do we think we ever did anything that we would consider threatening" the family over a possible ransom.

Secretary of State John Kerry told reporters Friday: "Let me just say that I am really taken aback -- surprised, I guess, is the word, by this comment with respect to the Foley family."

"I can tell you that I am totally unaware and would not condone anybody that I know of within the State Department making such statements," Kerry told reporters in Turkey, where he was working to build a coalition to battle ISIS.

Foley's execution was cited by President Barack Obama this week as he outlined his strategy for fighting ISIS , the terror group that calls itself the Islamic State.

Even so, Foley's mother, Diane, told CNN's Anderson Cooper that officials asked family members to "not go to the media." She said they were told the "government would not exchange prisoners," or carry out "military action" to try to rescue her son.

"I think our efforts to get Jim freed were an annoyance" to the U.S. government, she said in the interview that aired Thursday. "It didn't seem to be in (U.S.) strategic interest, if you will."

She said she was "embarrassed and appalled" by the way the government handled the case.

Kerry said he had worked on the effort to free Foley when he was taken hostage in Libya in 2011.

"Everybody is heartbroken that we were not able to do it" this time, he said.

U.S. National Security Adviser Susan Rice -- after praising the Foley family for doing "an amazing job ... to try to bring Jim home safely" -- said she "and others in the U.S. government worked very hard with Diane Foley and her family to try to be supportive, to try to provide what information we could."

Rice also pointed out that hundreds of U.S. personnel were involved in a rescue attempt in Syria to free Foley and others.

"Unfortunately, they were no longer there," Rice, a former U.S. ambassador to the United Nations, told CNN. "But I think that effort ... underscores the importance that we attach to doing everything that we possibly can to bring Americans in captivity back home."

Diane Foley told CNN the location of the hostages was known for more than a year, and the rescue operation came very late.