One man and two teenagers have been arrested and charged with the gang rape of a 16-year-old girl in Sydney's south west in June.

The girl was in the Liverpool library forecourt at night on Saturday, June 21, after using the council's free wireless internet when six men approached her and invited her to meet a mutual friend.

Police will allege she was then sexually assaulted by a group the men in the stairwell of a nearby car park while the other men failed to stop the attack.

After the assault, the girl returned to the library forecourt and told a bystander, who called the police.

The two 16-year-old men have been charged with aggravated sexual assault in company.