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.

READ MORE: Widow Of Good Samaritan Who Suffered Deadly Blow On DART Train, Seeking Answers And Justice

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.

READ MORE: Dallas' Vogel Alcove Breaking Cycle Of Poverty Through What Looks Like Playtime

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

La Grange is about 70 miles southeast of Austin.

MORE NEWS: 'The Heroism They Demonstrated Was Extraordinary' Senator Ted Cruz Speaks In Colleyville After Hostage Standoff

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