A 34-year-old man who "knows he did wrong and thinks he should pay for it" has confessed to killing 31 people, many of them professional men with whom he had sexual encounters, authorities said yesterday.

Bruce A. Davis, a drifter who had been arrested in West Virginia and found to be an escapee from an Illinois prison where he was serving time for two killings, said he killed 30 men from 1969 to 1971, according to Fayette County Sheriff's Cpl. Charles Bryant.

In addition, he confessed to the death of a prison guard, who was found axed after Davis' escape, police said.

The total also includes the two people he was convicted of killing and for which he was jailed.

Police from Illinois, New York City, Los Angeles, Reno, Nev., and Washington, D.C., interviewed Davis in his Fayette County jail cell and are investigating his confessions of killings in their areas, according to Capt. Terry Delaney of the Illinois Department of Law Enforcement.

In addition, Virginia authorities want to question Davis about a killing there, said Fayette prosecutor Paul M. Blake Jr.

Davis has not been charged in any of the deaths.

Authorities have confirmed that 12 of the slayings occurred, Bryant said.

According to Bryant, Davis claimed that he strangled or shot his victims, all of them white males whom he had not known previously, in hotel rooms or in woods. Davis said he had homosexual relations with many of them, according to Sheriff's Cpl. H.E. Hill.

Davis was returned yesterday to Chester, Ill., where he is wanted in the slaying of an employe at Menard Correctional Center, a maximum security facility, from which he escaped Oct. 24 while on a farm detail.