John McGrogan, 65, of Blackridge, began abusing the girls when they were aged six and 11.
The offences were committed between 1981 and 2005 at addresses in Edinburgh.
The former playground supervisor was sentenced at the High Court in Glasgow. He was earlier placed on the sex offenders register.
A judge heard how the victims finally revealed their ordeals in 2014 after McGrogan was convicted of child porn offences.
Lord Burns told McGrogan he had "exploited" the duo for his own "gratification".
He added the victim impact statements given to him had made "harrowing" reading.
McGrogan will also be supervised for a further four years on his release.
The first girl was aged 11 when she was raped. The other was attacked between the ages of six and 11.
Both told how, during the abuse, McGrogan would try and spoil them by buying sweets or computer games.
Tony Lenehan, defending said McGrogan's regret for what happened was "sincere".
A West Lothian pensioner who admitted raping two primary schoolgirls has been jailed for for eight and a half years.