Updated

A rejected asylum seeker who raped a 23-year-old German woman in front of her boyfriend after threatening the couple with a saw -- and who then called the victim "a prostitute" in court -- was sentenced to nearly 12 years in prison Thursday.

The man, identified by local media only as Ghana native Eric X., was convicted after DNA evidence linking him to the crime was found on the victim and at the crime scene, The Local reported. He was also found guilty of stealing a speaker and $7 from the couple. Eric X. received an 11 1/2 year prison term.

“If the court says the DNA fits, then I have to call the girl a prostitute," the man told the court during the trial. "Anyone who supports this girl who claims to have been raped is the dirtiest person on earth."

Eric X2

Eric X. walking in the courtroom in Bonn. (Mario Jüngling / BILD)

Eric X., 31, entered Germany from Italy in February after being denied asylum there, and his request for asylum in Germany was rejected March 23.

GREEK POLICE ARREST 8 SMUGGLERS WHO BROUGHT IN 38 MIGRANTS

It wasn't immediately clear why Eric X. was allowed to stay in the country. Authorities said on April 2 he used a saw during an attack on a couple camping at the public Siegaue Nature Reserve near Bonn.

The man appeared in court with his hands and feet chained as a psychiatric expert testified he was highly dangerous to society, The Daily Mail reported.

“If the court says the DNA fits, then I have to call the girl a prostitute. Anyone who supports this girl who claims to have been raped is the dirtiest person on earth."

— Eric X.

"Why should I remain silent about a case I don't know anything about?" Eric X. shouted at one point during the trial, professing his innocence.

In another outburst, after the court heard security footage showed Eric X. left his asylum shelter around 8 p.m. on the night of the crime and didn’t return until early the next morning, the man claimed lawyers were serving up a “trick question” and that he was inside the facility the entire time.

"I'm not interested in this kind of joke. I have no time to hear these fairy tales. They play games, so I look like a rapist," he said, according to the Die Welt newspaper.

POLICE IN ROME BLAST MIGRANTS WITH WATER CANNONS

Eric X. described his father in Ghana as a cocoa plant “king” who employed more than 100 people.

"He had a lot of money and was very well known. In Ghana, a king can have as many women as he wants, if he can take care of them,” Eric X said.

The victim told police she did not resist the attack, even though there was a Swiss army knife in the tent, and she told her boyfriend to call police, The Local reported.

But the frantic boyfriend reportedly struggled to convince police that the attack had happened and that he needed help.

“You are not f-----g with me I hope?” said one officer who took an emergency call, according to The Daily Mail.

The case prompted outrage across Germany, where high-profile crimes committed by asylum-seekers have drawn particular public scrutiny in recent years.

The Associated Press contributed to this report.