A Texas lawmaker was hit in the head by a stray bullet while celebrating during New Year's Day, police said.

State Rep. Armando "Mando" Martinez underwent surgery Sunday and is expected to recover.

Martinez is in stable condition and has been communicating with investigators through text messages, Hidalgo County Sheriff Eddie Guerra, told The Monitor.

>> Read more trending stories

Martinez was celebrating with family and friends outside a house when he felt something on top of his head a little after midnight Sunday, Guerra said.

Martinez's wife noticed a small hole in the top of his head. He was then rushed to the hospital.

Hidalgo County sheriff's deputies are investigating.