According to one son, Abdullah al-Ruqai, 20, they were enjoying being in that home together for the first time in their lives, acquainting themselves with uncles, aunts and cousins who all live in the same middle-class neighborhood, Noflieen, in the northeast of the capital near the sea.

Mr. Ruqai said that he had found a job driving a truck, and that his mother was also working. His grandfather had given them the family house and relatives were helping them, so they were managing, he said. Abu Anas had no job but he was respected — and consulted to resolve disputes — his son said. Known as the Sheik, Abu Abas, 49, could recite the Koran by heart and was regarded as a war hero for fighting in Afghanistan against the Soviets.

"He was known for supporting the freedom of others," Mr. Ruqai said in an interview outside the family house on Sunday evening. "He was fighting in Afghanistan against injustice, and if there was injustice or disputes over property here people came to him and he helped with that."

It was a short period of calm for Mr. Ruqai after a lifetime of following his father — born Nazih Abdul-Hamed al-Ruqai — a native of Libya who pulled his wife, four sons and a daughter through war zones and repeated flight for years, passing through at least six countries over 20 years.

To the United States, Abu Anas is a Qaeda computer expert who helped conduct surveillance on the United States Embassy in Nairobi, Kenya, ahead of the 1998 bombings there and in Tanzania that killed more than 200 people. He was indicted in 2000 in those attacks, as well as for conspiring with Osama bin Laden to attack American forces in Saudi Arabia, Yemen and Somalia. He is now being interrogated while in military custody on a Navy ship in the Mediterranean Sea, officials said.

To his son, he was a fighter with a storied past who tried to provide for and protect his family, despite being exiled from Libya decades ago for his opposition to Col. Muammar el-Qaddafi, suffering police harassment in Britain after seeking asylum there and undergoing years of harsh detention in Iran, a Qaeda foe, after the Sept. 11 attacks. Iran, in fact, held the entire family, Mr. Ruqai said.

"For the first four years they kept us underground in secret prisons," he said. "We did not see the sun. We all had skin diseases. They played psychological games on us. They told us we would live there for the rest of our lives. But you cannot control people's destinies."

All but the father came back to Tripoli in 2010, living under surveillance and threats from the Qaddafi government. Abu Anas followed in 2011 as the popular uprising began, joining the rebels fighting in the Nafusa Mountains in western Libya. It was a role that came naturally to him.

He had joined the mujahedeen in Afghanistan in the 1980s while a young man. After the war he was part of a group of fighters from Libya who formed a movement, the Libyan Islamic Fighting Group, to overthrow Qaddafi. In 1993 he moved to Sudan, where Bin Laden also settled. It was during this period that Abu Anas is alleged to have conducted the reconnaissance on the United States Embassy in Nairobi.

Mr. Ruqai, who was born in Sudan in 1993, said that his father had no choice but to live there. He was exiled from Libya, and Sudan was the only place that would accept the family. When Bin Laden returned to Afghanistan in 1996, Abu Anas moved his family to Britain and received asylum as a political dissident. Mr. Ruqai and his mother say his affiliation with Al Qaeda ended. The family settled in the northern town of Manchester, and Abu Anas worked in a pizza business.

After the 1998 embassy bombings, Abu Anas came under investigation by British authorities, who eventually found an 18-chapter terrorist training manual in his apartment. In 1999, the family headed to Afghanistan, where the Taliban were in power. They settled in Kabul, but the 2001 terrorist attacks sent them on the move again. After some months in Pakistan, they headed to Iran. But at a time when Iran was reaching out to the United States and collaborating on intelligence in Afghanistan, the entire family was detained by Iranian intelligence, as were members of Bin Laden's family and others considered possible Qaeda supporters.