Because of the growing alienation of young Iranians, family dynamics could be complex, particularly among the families of elite government officials. “These children are more affected by society and even Facebook and Twitter on the Internet than their families,” said Alireza Haghighi, an Iranian political analyst at the University of Toronto. “The younger generation has been very frustrated with the political situation.”

Image Narges Kalhor, an Iranian filmmaker, has applied for refugee status in Germany. Credit... Michael Dalder/Reuters

In Ms. Kalhor’s case, her parents’ religious and political conservatism did not extend to daily life. Her father, who has been an adviser to Mr. Ahmadinejad since 2005, helped and encouraged Ms. Kalhor to become a graphic designer and a filmmaker.

Mr. Kalhor embodied other contradictions, having appeared as a campaigner for Mr. Ahmadinejad on national television in 2005 wearing his long hair in a ponytail  something that is frowned upon by conservatives  and saying that all Iranians in exile, including the son of the shah, would be allowed to return to the country if Mr. Ahmadinejad were elected.

Ms. Kalhor said that through it all she remained close to her father until a year ago, when he moved out after separating from her mother. But she was also developing her own political views, she said.

“My generation wants its most basic needs such as freedom of expression and personal freedoms,” she said. “We want to live, we do not want to face persecution for expressing our political opinion; as women, we don’t want to walk on the street with the constant horror that we could be intimidated for showing an inch of hair.”

She said she began participating in the rallies in favor of Mr. Ahmadinejad’s leading opponent, Mir Hussein Moussavi, before the elections and voted for him in hope of real change. Infuriated by Mr. Ahmadinejad’s re-election, which she called a “gross lie,” she joined the protests, during which, she said, she was beaten by the police and tear-gassed.

“This was an explosion of 30 years of suppression and intimidations of my generation,” she said of the protests. “I am happy that we finally found the courage to speak up.”