A Texas prison guard has been charged with assaulting an inmate who later died from his head injuries.

The Texas Department of Criminal Justice announced on Tuesday that D'Andre Glasper, who resigned from the job, has been charged with aggravated assault by a public servant.

Authorities say Glasper injured inmate Gary Ryan during an August 30 confrontation in the showers of the Estelle Unit in Huntsville.

Guard charged: Texas prison guard D'Andre Glasper, 22 (left), has been charged with aggravated assault by a public servant in the death of inmate Gary Ryan, 58 (right)

Glasper allegedly assaulted Ryan in the showers at the Estelle Unit in Huntsville on August 30, after the inmate had spit on him

Ryan hit his head on the shower floor and died in a hospital two weeks later.

The department's Office of the Inspector General said the inmate had spit on Glasper on the morning of August 30 and that the guard was told by his superior to stay away from the prisoner.

But Glasper did not obey the order and returned to Ryan's cellblock later that day to escort the inmate to the showers.

There, the guard said Ryan became aggressive and was allegedly making derogatory remarks, reported Houston Chronicle.

According to officials, Glasper was trying to put Ryan 'prone on the floor' when the inmate sustained a head injury.

Ryan was found bleeding and unconscious, and was airlifted to Memorial Hermann Hospital in critical condition.

Ryan, left, was scheduled to be released from prison on November 23 after serving a five-year sentence for a charge of harassment of a public servant. Glasper, right, who had been a prison guard for two years, resigned his position on September 7

He underwent surgery to relieve pressure on his brain, but died on the morning of September 12.

Ryan was scheduled to be released from prison on November 23 after serving a five-year sentence for a charge of harassment of a public servant.

His criminal record included a 12-year sentence for aggravated assault with a deadly weapon, followed by a two-year sentence for the same charge.

Glasper, who had been a prison guard for two years, resigned his position on September 7 and was arrested three days later.

The 22-year-old is currently free on a $50,000 bond. If convicted of the felony charges against him, he could face up to a life in prison.