SAN DIEGO — A man was arrested Sunday afternoon after barricading himself in a Carlsbad motel room for several hours with a samurai-style sword and firearm, police said.

Around 9:41 a.m., officers with the Carlsbad Police Department were dispatched to the Carlsbad Village Inn in response to a report of a person brandishing a sword at paramedics, who were responding to an unrelated medical aid call.

Responding officers approached the room where the subject, later identified by authorities as 33-year-old Los Angles County resident Eliot Rauk, was staying to make contact.

When they neared the room, Rauk allegedly started yelling through the door and threatened to kill approaching officers, according to CPD Lt. Jason Jackowski. He also reportedly brandished a handgun, which officers saw through the motel room window.

Authorities proceeded to evacuate rooms in surrounding areas of the motel and secure a perimeter. The Carlsbad SWAT team and Crisis Negotiation Team was also called to the location, Jackowski said.

Police personnel communicated with Rauk for several hours after making cell phone contact. At 2:36 p.m., he exited his room and was safely taken into custody.

Rauk was transported to Tri-City Hospital for a medical evaluation before being booked into Vista Jail, Jackowski said. He faces charges of making terrorist threats, unlawfully brandishing a weapon and making threats of violence against a police officer.

According to CPD, a semi-automatic handgun and samurai-style sword were recovered after authorities searched his room in service of a warrant.

No additional details about the incident were immediately available.