Egypt has criminalised sexual harassment and introduced penalties including prison terms and fines, as the country attempts to control a rise in attacks on women.

Adly Mansour, the outgoing president, on Thursday approved a decree to make sexual harassment an offence punishable by up to five years' jail, or fines of between $400 and $7,000.

The decree defines harassment as any sexual or pornographic suggestion or hints through words, signs or acts, until now the country has not had a law defining sexual harassment.

The decree amended the country's current law, which did not criminalise sexual harassment and only vaguely referred to such offences as indecent assault.

A minimum two-year jail term was introduced for harassers who hold a position of power over their victim, is in uniform or is armed with a weapon. Penalties would double for repeat offenders.

Egypt has witnessed a jump in sexual assaults since the 2011 uprising that toppled Hosni Mubarak from the presidency, with large numbers of mob attacks on women during political protests.

A 2013 study by the UN said that 99.3 percent of women in Egypt had been subjected to abuse. Campaigners, such as the human rights lawyer Ragia Omran, have called for the government to do more to stop the abuse.

Initiatives to counter harassment have also multiplied. Volunteer groups started escorting women, especially during political gatherings. Activists offered self-defence classes for women and social networking sites launched "name and shame" campaigns.

The measures announced on Thursday were however met with scepticism by one campaigner.

Fathi Farid, a founder of the "I Saw Harassment" campaign that documents sexual harassment of women, said the penalties were of "no value" because they gave the judge the right to choose between a fine or jail.

He also said the penalties were "not enough for cases involving sexual assaults by mobs".