In the Heat of the Night (novel)

In the Heat of the Night is a 1965 mystery novel by John Ball set in the community of Wells, South Carolina. The main character is a black police detective named Virgil Tibbs passing through the small town during a time of bigotry and the civil rights movement.
The novel is the basis of the 1967 award-winning film of the same name, directed by Norman Jewison and starring Sidney Poitier, as well as a subsequent television series. Ball would feature Tibbs in the subsequent novels "The Cool Cottontail" (1966), "Johnny Get Your Gun" (1969), "Five Pieces of Jade" (1972), "The Eyes of Buddha" (1976), "Then Came Violence" (1980) and "Singapore" (1986).
Plot summary.
Sam Wood, a respected police officer in Wells, South Carolina, patrols the city every night. One night, after stopping at his usual diner for a snack and discussing black people unfavorably with Ralph, the night counterman, Sam finds a body in the middle of the highway. He reports the body, which is soon tentatively identified as that of Maestro Enrico Mantoli, the conductor and lead organizer of the city's upcoming music festival.
Bill Gillespie, the chief of police, is notified and sends Sam to the railway station. Sam finds a black man waiting for a train and arrests him on suspicion of murder. Gillespie questions the man, who identifies himself as Virgil Tibbs, a homicide investigator in Pasadena, California. 
The body is soon brought to the morgue, and Gillespie invites Virgil to accompany him. Gillespie performs a cursory examination of the body before leaving, while Virgil examines the body more thoroughly. Gillespie, meanwhile, suggests that Sam visit Mantoli's daughter and bring her to formally identify the body. 
Virgil is present for Gillespie's questioning of the suspect, Harvey Oberst, on whom Mantoli's wallet was found. Oberst had previously been in trouble for "playing around" with Delores Purdy, a local teenager. He confesses to taking Mantoli's wallet but denies killing him. Gillespie has him booked, whereupon Virgil states that he does not believe Oberst to be guilty, because he is left handed and the victim was hit from the right.
Sam drives to the home of George Endicott, a city councilman at whose house Mantoli's daughter is a guest. George and his wife Grace are among the lead sponsors of the music festival. Sam delivers the news to George, who identifies the body and offers his assistance to Gillespie.
Gillespie gets a phone call from Frank Schubert, the mayor of Wells. Schubert informs Gillespie that he and George have arranged for Virgil's services from his chief in Pasadena. Gillespie is reluctant to go along until Schubert points out that Virgil could be used as a scapegoat should he fail. Gillespie assigns Virgil to Mantoli's death and takes him to a garage run by a black mechanic named Jess, who lends him a used car.
Virgil wants to speak with Mantoli's daughter, and Sam takes him to the Endicotts' house. Sam and Virgil meet Mantoli's daughter Duena, along with his associate Eric Kaufmann. Virgil gathers information about the music festival, and as he and Sam leave, he announces his intention to speak with Oberst.
Oberst tells Virgil about Delores Purdy, specifically that she had come on to him during a date, whereupon he had been arrested. Oberst also states that he took Mantoli's wallet, which he found by his body, and reported it to Mr. Jennings, the banker for whom he works. Jennings had reported him to the police. Virgil then has Oberst released.
The next day, Ralph reports a missile engineer named Gottschalk to the police; he had stopped at the diner while passing through town on the night of the murder, and he had again stopped at the diner on his way back. Gillespie hands Gottschalk to Virgil, who questions him briefly before letting him leave. Gillespie worries that Virgil has let another suspect go, but Virgil states that Mantoli was not killed where his body was found, which clears Gottschalk.
That night, Virgil accompanies Sam on his patrol and asks him to retrace his steps from the night Mantoli was killed. Sam complies but takes a detour so as to not drive past the Purdys' house. However, after his stop at the diner, Virgil asks him why he changed his route.
The next morning, Gillespie receives an anonymous letter threatening him to get rid of Virgil; it angers him and makes him more resolved to keep Virgil. Virgil then reports Sam's detour. Gillespie defends Sam, but, after Virgil leaves his office, suddenly considers that Sam might have killed Mantoli. He meets with Jennings, who states that Sam recently paid off the mortgage on his house with cash. When Virgil reports to him that evening, Gillespie reveals that he has arrested Sam on suspicion of murder; Virgil states that he knows Sam to be innocent.
Delores and her father report to Gillespie that Delores is pregnant as a result of Sam seducing her. Virgil visits the Endicotts and Duena to ask more questions, and Duena asks him to bring her to the police station. Once there, she asks to see Sam. Duena gets Sam to state that he did not kill her father. After stating that she believes him, she kisses him.
Virgil visits the Purdys and states that because Sam has not confessed to seducing Delores, she will have to submit to medical testing to confirm her pregnancy in order to have a case against Sam.
Virgil visits Sam to clear up some details before going to see Gillespie; George and Duena arrive at the same time, and Virgil suggests that they hear what he has to say. He also asks that Sam be brought in. Virgil states that Delores has failed to convince him that she was violated and that she intended for Sam to see her naked and to confront her about it, but Sam wisely ignored it. Between this and the fact that he knows Sam to have a good reputation, he believes the seduction charge to be a lie. The Purdys retract their charge against Sam.
Virgil clears up Gillespie's suspicion of Sam as the murderer by saying that the majority of the $600 Sam paid the bank was in coins, and Gillespie releases him. Virgil asks that Sam be restored to duty and announces his intention to accompany Sam, who will make an arrest by morning.
That night, Sam and Virgil encounter Gillespie during their patrol; he joins them. Sam and Gillespie find Kaufmann at the diner and watch as Virgil enters the diner and provokes Ralph into approaching him. Virgil seizes Ralph and has Sam arrest him as Mantoli's killer.
The next morning, George calls Gillespie to invite him, Sam, and Virgil to a gathering at his house that night. There, George announces that Kaufmann has secured a conductor for the musical festival and asks him to personally conduct one show. He also announces that the venue will be named the Mantoli Bowl. Virgil is prompted to explain how he solved the case and reveals that he initially suspected Kaufmann but became interested in Ralph after he reported Gottschalk as a suspect. He also figured out that Ralph often visited Delores, and when she believed herself to be pregnant, he had the idea to rob Mantoli of enough money to pay for an abortion. He did not intend to kill him.
After the gathering, Gillespie sees Virgil to the railway station.