The 12-year-old son of a woman suspected of links to Al Qaeda and facing charges in New York was freed Monday by Afghanistan and sent to his family in Pakistan, two months after he was detained with his mother.

Officials say the boy, Ali Hassan, and his mother, Aafia Siddiqui, were detained outside the governor's house in Afghanistan's Ghazni province in July. The American-educated Pakistani woman was then handed over to U.S. custody and flown to New York where she was accused of trying to kill U.S. personnel.

The U.S. indictment alleges that during Siddiqui's interrogation in Ghazni, the 36-year-old picked up a soldier's rifle, announced her "desire to kill Americans" and fired at U.S. soldiers and FBI agents. She was wounded by return fire.

American prosecutors say that when taken into custody in Afghanistan, she was carrying handwritten notes referring to a "mass casualty attack" and listing the Empire State Building and other New York landmarks. However, the indictment contains no charges of terrorism.

Ali was with his mother at the time of her arrest and had been in Afghan custody ever since, officials said.

A spokesman for Afghanistan's Foreign Ministry, Sultan Ahmed Baheen, said Ali had spent the previous 10 days in a "guest house" of Afghanistan's intelligence service. Before that, he was in the custody of a prosecutor who deals with minors, the ministry said.

Baheen said Ali is a dual American-Pakistani citizen because he was born in the United States.

Elaine Whitfield Sharp, who represents the family of Aafia Siddiqui, said the boy's release was "wonderful news."

"I'm just so happy for them. Finally, something good has happened for the family," Whitfield Sharp said by telephone from Massachusetts.

She added that she had spoken briefly with Aafia and described her client as "excited" to hear her son had been released.

Afghan authorities handed him over to Pakistani diplomats, who flew him to Islamabad on Monday evening. The Pakistani Foreign Ministry said he had been handed over to relatives of his mother.

Whitfield Sharp said the son was apparently now at the home of an uncle in Islamabad.

Pakistan's Express News television channel showed footage of Ali, a round-faced boy with dark hair, smiling shyly beneath a white prayer cap as an aunt kissed and embraced him at a house in the capital, Islamabad.

Fauzia Siddiqui told reporters her nephew was "very traumatized."

"He is like a dead body. They fed him and tried to make him look healthy, but he is disturbed," she said. "Thank God he is grown. He is a big boy now."

She said Ali told his relatives Monday that his name had been changed several times and that each change was followed by a change of location. But she did not elaborate.

Aafia Siddiqui came to the United States in 1990 and studied at the University of Houston and Massachusetts Institute of Technology, where she got a bachelor's degree in biology in 1995. She later studied neuroscience as a graduate student at Brandeis University.

She vanished in Pakistan in 2003.

In 2004, then-Attorney General John Ashcroft and FBI Director Robert Mueller III identified Siddiqui as one of seven people the FBI wanted to question about suspected ties to Al Qaeda. Her family has vehemently denied any link.

Fauzia Siddiqui said she didn't want to blame anyone for Ali's ordeal and expressed hope that the embrace of his relatives would allow her nephew to forget.

She dodged a question about the circumstances of her sister and nephew's detentions in Afghanistan.

In Washington, State Department spokesman Sean McCormack told reporters the U.S. was following the latest developments closely.

Aafia Siddiqui's lawyers claim that before she was arrested and brought to New York, she was kidnapped by U.S. operatives and kept in secret captivity in Pakistan. The ordeal, they said, left her with severe physical and mental problems.

Last week, a warden at a federal prison in Brooklyn notified a judge that Siddiqui is suffering from major depression.

U.S. officials deny she was ever in their captivity before she surfaced in Afghanistan in July.

Baheen said Ali was adopted by Siddiqui after his parents were killed in an earthquake that struck Kashmir in 2005. However, Pakistan's Foreign Ministry spokesman Mohammed Sadiq said DNA tests done by U.S. authorities showed that the boy was Siddiqui's biological son.