A Saudi Arabian court has ordered four men to receive as many as 2,500 lashes and sentenced them to jail terms of up to 17 years after they raped a foreign national in front of her husband and daughter.

The men, three from Saudi and one from Sudan, were sentenced by a court in Jeddah, which did not reveal the nationality of the victim.

One of the men, who was 17 at the time of the attack, was jailed for 17 years and will receive 2,500 lashes in 50 separate sessions, according to the Saudi daily newspaper Al Riyadh.

Two of the men were sentenced to 15 years each and 1,500 lashes while the last defendant received five years in prison and 1,500 lashes.

The court heard how the gang broke into the victim’s house in Jeddah, restrained her husband with electric wire and raped her in front of him and their young daughter.

The men then made off with 10,000 Saudi riyals (about £2,100) and eight mobile phones before returning to the house and raping the woman again at knifepoint.

The four men confessed to their crimes after they were arrested by police. There were calls for them to be executed.

Last month, Saudi Arabia executed a member of its royal family for an alleged murder.

Prince Turki bin Saud al-Kabir was sentenced to death for allegedly shooting dead Adel al-Mahemid after an argument erupted at a desert camp on the edge of Riyadh three years ago.

The House of Saud rarely sees executions of its own members, who number in the thousands.

One of the most prominent cases was Faisal bin Musaid al Saud, who was sentenced to death for assassinating his uncle, King Faisal, in 1975.

Saudi Arabia’s strict legal code means murder, rape, armed robbery, drug trafficking and apostasy can all receive the death sentence.