Almost 20 years after 6-year-old JonBenet Ramsey was killed in her Boulder home, a man once interrogated in the unsolved case is in Boulder County Jail facing charges with sexual exploitation of a child.

Gary Howard Oliva, 52, is being held after the National Center for Missing and Exploited Children received a “cybertip” from Internet search engine company Google, that suspected child pornography was uploaded to Gmail by a user, according to an arrest affidavit.

The porn was uploaded from various IP addresses located in Boulder.

A Boulder police investigator reviewed sexually explicit images of a girl between 4 and 7-years-old attached to an email account registered to Oliva, according to the affidavit.

He is accused of uploading 22 separate sexually explicit images, all of them of children younger than 10, and some engaged in sex acts “either with each other or with adult males,” the affidavit said.

Oliva was among suspects who rose to police attention after the murder of child beauty queen JonBenet in 1996.

“The focus on him has to do with this new case, we are not in a position at this point to say if he is being looked at in connection with JonBenet,” said Boulder city spokeswoman Sarah Huntley. “We are not comfortable ruling anybody in or out as a suspect in connection with JonBenet, including Mr. Oliva.”

Oliva has a history of sexually abusing minors and lived blocks from the Ramseys at the time of the murder.

Four years later, Boulder police questioned him and cleared him after he was arrested on unrelated charges.

In 2002, while Oliva was in Boulder jail awaiting extradition to Oregon on a parole violation, he gave a jailhouse interview in which he said he was being “persecuted” because of his history of pedophilia, according to a Denver Post article at the time.

“JonBenet’s murder touched me very deeply,” Oliva told The Post. “I feel she was an exceptional girl whose death was an exceptional loss. I felt the need to build a monument, a shrine, to remember this little girl.”

That, he said, is why he had a photo of JonBenet in his backpack when Boulder police arrested him on a drug charge in December 2000, he said. Police also found a stun gun in the backpack. Some investigators believe a stun gun was used in the killing.

Oliva said that he was given the stun gun by a friend who was concerned about his safety.

At the time he was arrested and questioned in 2000, Oliva gave police hair samples for DNA testing, he said in the interview.

According to the current arrest affidavit, Oliva is homeless and told police he stays in Boulder.

A Boulder police investigator found that one of the IP addresses used in the child pornography case is associated with guest wifi that is available without a password in any Boulder County building, the affidavit said.

Another IP address was assigned to a company located at 5375 Western Ave., Unit D, in Boulder, the affidavit said.

“I checked a map and found that this location is very similar to a location that Oliva pointed out on a map … as to where he had been staying when he registered 10/21/15” as a sexual offender with the Boulder Police department, according to the affidavit.

Oliva is being held on $10,000 bond, in the investigation of two counts of attempted sexual exploitation of a child and one count of sexual exploitation of a child. His next court date is July 11, at 9 a.m., according to court records.