A suspect wanted for a violent sexual assault at a South Beach hotel was apprehended Thursday afternoon in Bakersfield, California, authorities said.

Derrick Jackson, 28, was taken into custody at a Motel 6 in Bakersfield after U.S. marshals and Miami Beach detectives learned Thursday morning that he was in that area, the U.S. Marshals Service said.

Top News Photos of the Week

Marshals and members of the U.S. Marshals Pacific Southwest Regional Fugitive Task Force began checking numerous hotels for Jackson before he was seen walking on a second-floor balcony at the motel at 5241 Olive Tree Court. He was quickly apprehended and arrested, the Marshals Service said.

Famous Mug Shots: Rick Ross

The suspect followed the woman into an elevator at the hotel at 940 Ocean Drive at about 4:30 a.m., saying that he was going to the same floor. As they got out of the elevator, he overpowered the woman and later sexually battered her, Miami Beach Police said.

Afterward he allegedly forced her back to her apartment where he robbed her of valuables.

Surveillance cameras at the Hotel Breakwater recorded Jackson following the victim to the elevator, and Miami Beach detectives quickly identified him as the suspect.

His picture was shown on the news in Miami, and after Jackson learned that he had been identified in the alleged sexual assault, he fled the area, the Marshals Service said.

Marshals and Miami Beach detectives followed leads for the past two weeks, and on Wednesday they learned that Jackson was in the Sacramento, California area, the Marshals Service said.

“Jackson has a history of committing violent sexual assaults and kidnapping his victims. In March of 2006, Jackson was convicted (in) Miami-Dade County of kidnapping, sexual assault, burglary, strong armed robbery, and grand theft charges,” the agency said.

He was sentenced to seven years in state prison and served just under five years, getting released in January 2011. Upon his release he was required to register with law enforcement as a sexual predator four times a year, and he kept his sex offender registration current until September when the Miami Beach incident occurred, the Marshals Service said.

Jackson will be extradited back to South Florida to face the Miami Beach charges, the Marshals Service said.