Although Hassan has similarities to both characters, the social status he was born into makes him most similar to Mariam. In the novel A Thousand Splendid Suns, Mariam is born the illegitimate child of a businessman, Jalil, and his housekeeper, Nana, which automatically makes her stigmatized by society and even looked down upon by her own mother. Although her father has nine legitimate children with his three wives, he agrees to support Mariam and her mother and even visits his daughter on Thursdays. However, when her mother hangs herself because she is worried her daughter will leave her, Mariam is sent to live with her father, but he promptly marries her off to a wealthy shoemaker named Rasheed. Due to Mariam's low social status as an illegitimate daughter, she has no choice in her fate and is treated more like a servant than a wife by her abusive husband.
This upbringing is very similar to Hassan's in The Kite Runner. Like Mariam, Hassan is automatically born with a lower social status because he is a Hazara, or Shia Muslim, when the people in power in Afghanistan are Sunni Muslims. Ironically (and unbeknownst to him), he is actually the illegitimate son of a wealthy Shia businessman, Baba, who is also the father of the narrator, Amir. Hassan is brought up by Baba's adopted brother, Ali, who is a Shia Muslim, and therefore he and his son are servants to Baba and Amir. Amir and Hassan grow up together as best friends, but Hassan will never be on the same level as Amir because of his social status. Though he is very intelligent, he does not get the same privileges as Amir, such as going to school and learning to read. Despite this inequality, Hassan seems satisfied with his life and wholly devoted and loyal to Amir.
In the end, both characters, despite their disadvantaged lives, are good people and loyal friends to characters who have more privilege than them. After Rasheed marries a younger wife, Laila, who is from a wealthy family, Mariam is at first very jealous, and the two women fight and compete. However, when Laila defends her from Rasheed, they become close friends and work together to protect themselves and Laila's children from him. In fact, Mariam is such a loyal friend that she kills him in defense of Laila, knowing full well the consequences. Similarly selfless, Hassan willingly sacrifices himself to the bully to get the trophy kite for his best friend.