A Malaysian rape suspect who married his 14-year-old victim to avoid jail will be brought back to court for a retrial, the accused's lawyer told AFP on Saturday.

Ahmad Syukri Yusuf, 22, allegedly raped the girl, now 15, last year in Malaysia where rape charges can incur a sentence of up to 30 years in jail and whipping.

But a court in Sarawak ruled last week it would not proceed with the case after it emerged the accused had married his alleged victim, sparking an outcry by activists and politicians.

"It's back to square one. The trial will be heard again. It will be difficult for me. It is a retrial," Ahmad's lawyer, Azam Trudin, told AFP.

Activists welcomed the fresh hearing which is expected to take place end of September, with some calling for child marriages to be made illegal.

Heang Lee Tan from Women's Aid Organisation in Malaysia said the retrial would "send the message that rape is a heinous crime, which we will not tolerate in our society."

"You endorse the violent act (of rape) by allowing that marriage to take place in the first place," said Meera Samanther of the Association of Women Lawyers in Malaysia.

"We should ban all child marriages."

Child marriages are not uncommon in Muslim-majority Malaysia.

Girls below the age of 16 must obtain the permission of Islamic courts – who regulate civil matters for Muslims – but activists say such permission is too readily granted.

Over the years there have been renewed calls for the government to outlaw child marriages.

In 2013, a man who raped a 12-year-old girl avoided prison after he married her, provoking an outcry among rights groups. However, the following year a high court sentenced the father-of-four to 12 years in jail.

Malaysia's Women, Family and Community Development Minister Datuk Rohani Abdul Karim on Thursday said authorities will in future prevent suspects accused of rape from marrying the alleged victim.