An alleged armed robber who barricaded himself in a car was taken into custody, according to police.

The Houston SWAT team surrounded the 43-year-old man in his car on the 2900 block of Briar Park in the parking lot of the Houston Marriott Westchase, police said.

Police said the man was walking around the hotel parking lot with a pistol trying to get into vehicles.

He found an unlocked vehicle and got in, which is when he was surrounded by police and SWAT officials, according to officials.

Police said the standoff lasted an hour and a half.

The man is being charged with aggravated assault and burglary of a motor vehicle, according to officials.

Authorities said they found a pistol inside the car.