Spokesman Ajith Rohana said the girl told police she had been "molested by a person at the navy detachment" from Krai Nagar, the site of Sri Lanka's main naval base in the northern peninsula of Jaffna.
Residents in the area told Reuters that the girl had repeatedly been taken into a building used by the navy and raped. Seven naval personnel on duty at the time were arrested but released on bail after the girl could not identify an attacker, Rohana said.
Navy Spokesman Kosala Wanrnakulasuriya said the navy is conducting a separate inquiry while assisting the police.
The naval base is within the area where the majority Sri Lankans fought a 26-year civil war with Tamil separatists. Tamil National Alliance, an opposition party and the former political proxy of the now-defeated Liberation Tigers of Tamil Eelam, said the alleged attack showed the security forces still based in the area were not protecting residents.
"With this incident, young women are scared to come out of their houses," Suresh Premachandran, a TNA legislator, told Reuters. "This shows they are not protected by security forces."
Tamils as well as international community have been trying to convince President Mahinda Rajapaksa to reduce the number of military personnel in the north. The government says the threat of a resurgence of insurgent activity means the military's presence is still needed.