A refugee from Ghana has been arrested for dragging a young woman from her tent and raping her while she was on a camping holiday with her boyfriend.

The young couple were on a camping trip in the Siegaue Nature Reserve, north of the former German capital of Bonn, when they were approached by a machete-wielding man at about 12.30am on Sunday last week.

The boyfriend was forced to watch as the attacker violated his 23-year-old lover.

A refugee has been arrested for dragging a young woman from her tent and raping her while she was on camping with her boyfriend at in the Siegaue Nature Reserve (pictured), Bonn

The boyfriend, 26, who had also been threatened by the man, contacted police and medical responders took her to hospital.

A photofit picture of the attacker led to his arrest on Saturday and DNA testing confirmed his guilt, according to police.

He tried to flee when police moved in to arrest him, flinging a rucksack at one officer.

It turned out that the backpack was stolen from a barbecue party shortly before the rape occurred.

The rape was one of the most high-profile sex attacks laid at the door of refugees since the migrant crisis began, prompting hundreds of tips from the public.

The 31-year-old asylum seeker was arrested in Siegburg after a walker recognized him from the police wanted poster.