LA GRANGE, Texas (CBSDFW.COM/AP) — A Texas sheriff’s deputy has been shot and critically wounded  after an attempt to serve an arrest warrant ended in gunfire and a three-hour standoff.

Authorities say it began about 6 p.m. Thursday when a deputies went to a La Grange discount store to serve a man with a warrant charging him with failure to register as a sex offender.

La Grange police Chief David Gilbreath says the suspect cut a deputy with a knife before darting to a nearby motel.

Fayette County Judge Ed Janecka says deputies followed and the suspect opened fire, shooting one deputy in the head. That deputy, who has not been identified, was taken to a hospital in critical condition.

The suspect hunkered down in the motel, but a three-hour standoff surrendered to authorities.

La Grange is about 70 miles southeast of Austin.

(© Copyright 2018 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)