Background: News footage of the aftermath of a trailer fire in Amarillo, Texas (KVII). Inset: Luis Angel Rico (Potter County Sheriff's Office).

A Texas man is behind bars and charged with murder after police accused him of setting his roommate on fire while he was still alive.

The Amarillo Police Department's investigation began on Oct. 27, when first responders arrived at a fire at an Amarillo trailer park. According to reporting by local ABC affiliate KVII, officers got to the scene at 4:53 a.m. and found an RV trailer completely engulfed in flames. After neighbors were evacuated safely and the fire was put out, firefighters came upon a disturbing sight. A dead body had been inside the trailer.

KVII reported that witnesses told police they saw someone walking away from the trailer right before they saw the smoke.

Love true crime? Sign up for our newsletter, The Law&Crime Docket, to get the latest real-life crime stories delivered right to your inbox.

Police later identified the man found inside the trailer as 46-year-old James Sosa. According to a criminal complaint obtained by KVII, an autopsy revealed "soot deposits in his trachea and both airway paths to the lungs," which proved that he was alive during the fire.

Later in the day on Oct. 27, police spoke to 46-year-old Luis Angel Rico, who came back to the scene of the fire that engulfed the trailer where he lived with Sosa, his roommate. Police said that Rico told them that Sosa was watching TV on his phone when he last saw him in the trailer between 1 a.m. and 2:30 a.m. He told police that Sosa was also burning a candle.

According to the complaint, Rico said he saw smoke coming from the direction of the trailer while he was in another location nearby. He told police that he thought Sosa might still be inside the trailer. When he went back to the trailer and saw it on fire, he told police he went to call 911, but already heard the sirens of first responders.

More from Law&Crime: Man killed roommate, buried him in 'shallow grave,' then convinced friends victim 'died of pneumonia': Police

Rico was questioned by police and denied any involvement in the fire. But when he was in the presence of police, they noted that he smelled like gasoline and had soot on his hands. Police arrested Rico after finding four fentanyl tablets in his pockets and charged him with drug possession.

Further investigation by the fire marshal's office revealed "the presence of an accelerant on Rico's right pants leg, right coat sleeve, and both shoes." Rico was charged with murder, accused of setting Sosa on fire while he was still alive.

Rico was taken into custody and booked into the Potter County Jail, where he is being held without bond.