A SWAT scene came to an end late Thursday night after a man who barricaded himself inside a southwest Houston DPS office surrendered.

Officials say the man, who appeared to be a customer, entered the office in the 12220 block of South Gessner Road before 6 p.m. Thursday. They say employees did not realize he locked himself in a bathroom.

The man refused to leave for several hours, and the scene came to an end just before 10 p.m. Thursday.

The man surrendered and was taken into custody.

It is unknown at this time why the man barricaded himself in the building.