President Trump met at the White House Friday with an Egyptian-American woman whose freedom he had personally worked to secure after she had been imprisoned in Egypt for nearly three years.

Mr. Trump greeted Aya Hijazi, an Egyptian who holds U.S. citizenship, in the Oval Office shortly after her return to the U.S. on a military flight from Cairo.

“We are very happy to have Aya back home, and it’s a great honor to have her in the Oval Office,” Mr. Trump said.

SEE ALSO: Charity worker returns to U.S. after 3-year detention in Egypt

She was accompanied by her brother in the meeting, which was also attended by presidential aides Jared Kushner, Ivanka Trump and Dina Powell, a National Security Council official who was born in Egypt.

White House press secretary Sean Spicer said Mr. Trump was “directly engaged behind the scenes” on behalf of Ms. Hijazi. She was flown to the U.S. after being acquitted by a Cairo court of human trafficking charges stemming from her work with street children.

Mr. Trump raised the issue of her imprisonment with Egyptian President Abdel Fattah Al-Sisi privately during his visit to the White House earlier this month, Mr. Spicer said. He said the president “made it clear to the Egyptian government how important it was to him that this American be released and returned.”

Wade McMullen, a lawyer with the Robert F. Kennedy Human Rights group who represented Ms. Hijazi, credited Mr. Trump with gaining her freedom.

“President Trump deserves credit where credit’s due. His personal engagement on this case was key,” Mr. McMullen said in an interview.

In the days leading up to Mr. Trump’s meeting with the Egyptian president, Mr. McMullen said, he and Ms. Hijazi’s family were “working closely with senior administration officials making sure that Aya’s case was prioritized at the highest levels.”

“We were working mainly with the National Security Council,” Mr. McMullen said. “Acting at the president’s instruction, there were lots of people on the National Security Council who were highly engaged on this case. Dina Powell, with her background, played a key role.”

He also credited the Obama administration for calling publicly last fall for Ms. Hijazi’s release, which may have resulted in her case being reassigned to a new Egyptian judge who was considered more independent.

Mr. Spicer said the president took an interest in her case soon after taking office, and directed his national-security team to work on gaining the woman’s release.

“The president and the team worked behind the scenes in a much more productive way … to achieve the results,” he said. “This was handled primarily through diplomatic channels.”