ANNAPOLIS, Md. (AP) — A Maryland court has upheld the convictions of one of five men charged in the videotaped sexual assault of a teenage girl in an Ocean City hotel room.

A jury took only eight minutes last year to convict Erick Ramirez of rape, assault, sexual offenses and filming child pornography.

He was sentenced that same day to 18 years in prison.

On appeal, Ramirez argued that the judge erred in sentencing him immediately after conviction.

The Court of Special Appeals disagreed Thursday, noting that Ramirez's attorney did not object to immediate sentencing.

Ramirez and four other men were charged with attacking an unconscious 17-year-old girl on Memorial Day weekend in 2016.

The investigation began after Ramirez was arrested on drug charges and police found sexually explicit videos on his phone.