This movie is the inspiration for the 1970s television show McCloud.
Coogan's Bluff
(1968)

Walt Coogan (Clint Eastwood) is a womanizing deputy sheriff from Arizona who is ordered to go to New York City to extradite escaped murderer James Ringerman (Don Stroud). Upon arriving, NYPD Lt. McElroy (Lee J. Cobb) informs Coogan that Ringerman is at Bellevue Hospital due to a bad acid trip and cannot be extradited until the hospital releases him, which could be several days. After flirting with probation officer Julie Roth (Susan Clark), Coogan bends some rules to get Ringerman out of the hospital right away. While at the airport waiting to board their flight back to Arizona, Coogan is attacked by Linny, Ringerman's hippie girlfriend, and his friend Pushie and Ringerman escapes.

Coogan goes to the apartment of Ringerman's mother to try to get information of his whereabouts, but gets arrested by a detective for impersonating a police officer.

Back at NYPD, Lt. McElroy tells Coogan that he has no authority outside of Arizona and, after informing his superior back in Arizona, is taken off the assignment and ordered to go home. Coogan, who has vowed not to return to Arizona without Ringerman, finds out that Linny's probation officer is Julie. He is able to get Linny's address from Julie's home files while getting to know her better. He tracks down Linny at a psychedelic nightclub, where they eventually go to her apartment and have sex. She then promises to take Coogan to meet Ringerman, but instead takes him to a pool hall run by Pushie. There, Pushie and his men attack Coogan, but Coogan puts up a fight. He kills three of the attackers and beats up Pushie before everyone leaves upon hearing police sirens.

Coogan returns to Linny's apartment and threatens to kill her if she doesn't take him to Ringerman. The scared Linny takes him to Fort Tryon Park, where Ringerman is hiding out. Coogan chases Ringerman on a motorcycle throughout the park, where he eventually catches him and requests a citizen's arrest to the arriving Lt. McElroy.

At the end, Coogan and Ringerman are at the airport awaiting their flight when Julie shows up and kisses Coogan goodbye.

Thanks Steven!