The court also imposed a fine of Rs 200 on each of them.
Fast track court judge Rajesh Kumar Gupta awarded the sentence to Govind Patel (21) and Omkar Rajak (26), both from Sagar district, after convicting them under sections of the IPC, including 376 (2)(g) (gangrape).
The duo, who lived in a rented house, lured the victim living next door at Musakhedi locality of the city on March 19, 2003 and took her to their native district.
"They kept the girl in a slum and gangraped her there for 20 days," Additional Public Prosecutor Ravindra Desai said.
The court had examined 16 prosecution witnesses in this case, Desai said.