Joshua Gichuki, the convict at the centre of the landmark case, however, urged the Supreme Court to affirm a finding that judges and magistrates should be given leeway to deal with those convicted of sexual abuse.
In the meantime, friends of the court (amici curiae) - Federation of Women lawyers (Fida), Women's link Wordwide, Kenya Legal and Ethical issues Network on HIV and Aids (Kelins), and Initiative for Strategic Litigation in Africa (ISLA), want the minimum sentences retained.
However, the groups suggested an avenue for judges to mete out lower sentences than those provided based on circumstances of each case.
The case was heard by Chief Justice Martha Koome and Justices Mohammed Ibrahim, Smokin Wanjala, Njoki Ndung'u and Isaac Lenaola.
In his submissions, Mr Ingonga argued that the Court of Appeal erred by finding that Sexual Offences Act is unconstitutional for prescribing mandatory sentences to be handed to convicts.
According to him, Parliament crafted the current law based on knowledge and appreciation that victims of sexual violence live with scars of either rape, gang rape, defilement or absurd behaviours such as groping.
He argued that the Court of Appeal was not supposed to re-open Gichuki's case as the facts of the case were not contested.
The DPP was represented by acting assistant DPP Alex Jami, senior assistant DPs Jason Makori and Duncan Ondimu, and prosecution counsel Becky Arunga.
The DPP appealed against the verdict of Court of Appeal judges Wanjiru Karanja, Patrick Kiage and Jamila Mohammed. He argued that Kenya's law lacks safety valves to ensure victims receive justice and that convicts do not repeat the offence.
He asserted that the three judges made an error by reducing Gichuki's sentence, as he had not raised the same issue before the High Court.
Ingonga explained that the sentences provided do not compromise the independence of Judges and Magistrates.
"The imposition of mandatory sentences is a function of the legislature as having recognition in liberal democracies. The legislature is a repository of knowledge and therefore imposing mandatory sentences was part of its functions. The Parliament looked at the interests of the accused person and that of the society. The Act looks at the interests of the victims and does not violate the question of discretion,'' said Ingonga.
Chief Justice Martha Koome said the court will hand its judgment on notice. [Bonface Okendo, Standard] On the other hand, Gichuki urged the court to find that imposing mandatory sentences in the Act is a violation of the Constitution.
Gichuki was initially representing himself. However, the Court of Appeal directed lawyer Wahome Gikonyo to represent him. In his submissions, Gikonyo was of the view that the sentences provided in law are cast in stone.
Stay informed. Subscribe to our newsletter
According to him, this does not give a judge or a magistrate leeway to hand a judgment based on circumstances of the offence and the mitigating factors.
He stated that in his client's case, the victim who was 15 years voluntarily walked to Gichuki's home. Wahome said Gichuki would have gotten another sentence if the magistrate was allowed to look into other factors beyond the offence.
The minimum sentences violate the separation of powers. Wahome said it is not the work of Parliament to sentence convicted persons.
According to him, setting the number of years a person should serve for an offence amounts taking away judges' and magistrates' powers to mete an appropriate sentence.
"A law that disallows mitigation and judicial discretion in sentencing is unfair and unjust. It is the role of judicial officer to sentence. It is not the role of Parliament," argued Wahome.
Wahome asserted that there is no definite yardstick to justify why a person should serve 20 years while another will be handed life without a variation. According to Gichuki, all offenders, including minors are handed same sentence. He said this is unfair.
The debate over whether the country should change the Sexual Offences Act has been ongoing for years . However, there is no consensus on the constitutionality of punishing sex offenders based on the sentences provided under the Act. Some judges argue that mandatory sentences should remain, citing the initial case on mandatory death sentences which only involved convicts found guilty of murder.
The Amici were represented by lawyer Winfred Odali. Ms Odali took a different route from Ingonga and Gichuki.
Odali urged the Supreme Court to consider that majority of the victims are women. She submitted that i92 percent of the victims are women and girls. She said Kenya records at least 16,482 rapes every year.
According to Odali, it is unfair and discriminatory for courts to hand sexual offenders sentences other than those provided in the law. The lawyer said that other countries such as Botswana are in the process of increasing the minimum sentences in their laws to help tame sex pests.
"The Sexual Offences Act established mandatory minimum sentences to address the long-standing problem of judicial officers meting out lenient or inconsistent sentences for sexual offences. There is need for courts to adopt a victim-centred approach in sentencing of offenders considering the high number of sexual offences cases," argued Odali.
The Sexual Offences Act states that if someone sexually assaults a minor between the ages of 12 and 15, they will be sentenced to a minimum of 20 years in prison.
If someone engages in sexual activity with minors between the ages of 16 and 18, they will receive a minimum sentence of 15 years. Those who sexually assault children under the age of 11 will receive a life sentence.
The CJ said the court will hand its judgment on notice.