On May 25, 1969, United Artists released the film Midnight Cowboy, starring Jon Voight (Texas transplant Joe Buck) and Dustin Hoffman (the sleazy Ratso Rizzo) as street hustlers in NYC. It was the first studio film to receive an X-rating (the studio refused to edit anything out), and it became the first X-rated movie to be nominated and win a Best Picture Oscar (A Clockwork Orange and Last Tango in Paris followed suit with X-rated nominations). Hoffman and Voight were also nominated for Oscars, and screenwriter Waldo Salt and director John Schlesinger ended up winning gold statuettes for the movie. After the movie became a success, the MPAA demoted its rating to an R.

Based on the novel by James Leo Herlihy, the film featured controversial gay intonations, yet it grossed $44 million—about $200 million by today’s standards. The movie saved the careers of its actors, producers, and Salt, who had been blacklisted and fallen on hard times. It also produced a hit song, Harry Nilsson’s “Everybody’s Talkin’.” Here are 15 facts about the landmark film.

1. JOHN SCHLESINGER WAS RELUCTANT TO HIRE DUSTIN HOFFMAN.

Like everybody else, the filmmakers associated Dustin Hoffman with Benjamin Braddock, the clean-cut twentysomething he played in The Graduate. “The truth was, I saw The Graduate as a setback, because I was determined not to be a star,” Hoffman told the Los Angeles Times. Hoffman was doing Off Broadway performances during the casting of Midnight Cowboy, so Schlesinger checked him out in a play. Hoffman frequented an automat with fellow thespians Gene Hackman and Robert Duvall; one night Hoffman showed up there with a scruffy beard, disheveled clothes, and a Bowery accent. Schlesinger said to Hoffman, “Why Dustin, you do fit right in,” and he got the part.

2. MIKE NICHOLS TRIED TO TALK HOFFMAN OUT OF DOING THE MOVIE.

Hot off the heels of Mike Nichols’ The Graduate, Hoffman could’ve kept his romantic lead image up, but instead he opted to take a supporting part in Midnight Cowboy. “Mike Nichols, in fact, called me up,” Hoffman told Peter Travers. “And he says, ‘Are you crazy?’ He says, ‘I made you a star. This is an ugly character. It’s a supporting part to Jon Voight.’ He says, ‘What are you doing? Why are you sabotaging?’” But Hoffman stuck to his guns and took the role. “I love the fact I was trying to remain a character actor and that was my desire,” he said.

3. VOIGHT WAS CAST ONLY AFTER THE ORIGINAL ACTOR WAS FIRED.

Jon Voight auditioned for the role of Joe Buck and really wanted the part, but the producers chose Michael Sarrazin, whose major claim to fame is the 1969 Jane Fonda film They Shoot Horses, Don’t They? “Sometimes I would be offered a role and I would recommend somebody else—I was that kind of person,” Voight told Box Office Mojo. “Yet this one stopped me because the thing I was excited about for this piece wasn’t going to happen. I felt quite sick about it.”

Fortunately for Voight, the producers changed their minds when Sarrazin demanded more money. “It came back to looking at our screen tests back to back,” said Voight. “Apparently, Marion Dougherty, who was the casting director, was in the room and said, ‘Well, there’s no doubt who's the best actor.’ John Schlesinger said, ‘Who?’ And she said, ‘Jon Voight.’ Then, Dustin was called in to look at the tests and apparently he said, ‘When I look at my scene with Michael Sarrazin I look at myself—when I looked at my scene with Jon Voight, I look at Jon.’ That was a huge compliment. I think between these comments, that’s what tipped the balance and then John [Schlesinger] came forward, so I was very fortunate.”

4. VOIGHT WORKED FOR SCALE.

Voight was so desperate to play Joe Buck that he worked for scale: “‘Tell them I'll do this part for nothing,’” Voight recalled to The Telegraph. “They took me at my word, and they gave me minimum for Midnight Cowboy.” At the end of the shoot, they sent him a $14.73 bill for meals on the last day of filming.

5. HOFFMAN THOUGHT THE MOVIE WOULD RUIN HIS CAREER.

The actor attended a preview of Midnight Cowboy and noticed “people walked out in droves.”

“Twenty minutes into that movie, Jon Voight has a gay sex scene in the balcony with a kid who was played by Bob Balaban, and people would get up at that point and just walk out of the theater,” Hoffman told Larry King. “We said, ‘We have big problems’ when we heard we got an X-rating and we thought this could end everybody’s career. As a matter of fact, I was talked into doing a movie I wished I hadn’t done, because they had me so frightened that I had buried myself and reversed whatever good The Graduate did.” Hoffman’s agent forced him to star with Mia Farrow in the romantic drama John and Mary to make him “look like a respectable person.”

6. VOIGHT KNEW THE FILM WAS DESTINED TO BECOME A CLASSIC.

Voight and Schlesinger wrapped filming in Texas and Voight noticed how red the director’s face was. Voight thought Schlesinger was having a heart attack and asked him if he was okay. “He looked up at me and said, ‘What have we done? What will they think of us?’ After all, we had made a film about a dishwasher who lives in New York and f*cks a lot of women,” Voight told Esquire. “In the moment he’d finished it, he was shaking. All of a sudden, he saw it as banal and vulgar. He’s having an anxiety attack and I grabbed his shoulders to shake him out of it. I said, ‘John, we will live the rest of our artistic lives in the shadow of this great masterpiece.’ He said, ‘You think so?’ I said, ‘I’m absolutely sure of it.’ The only reason I said such an extravagant thing was because I wanted to get him out of it and nothing would take him out of it but that. But the statement turned out to be true.”

7. VOIGHT AND HOFFMAN WERE COMPETITIVE WITH EACH OTHER.

What made the chemistry between Hoffman and Voight work so well is they were constantly competing with one another. Hoffman became a movie star before Voight did, and that brought some jealousy to the set. “We were like Marvin Hagler and Sugar Ray Leonard, two fighters going at it,” Hoffman told the Los Angeles Times. “We knew the movie depended on the bond between us. All through shooting, we’d say to each other, out of the side of our mouths, like a fighter in a clinch, ‘Buddy, is that the best you can do?’”

8. HOFFMAN PLACED PEBBLES IN HIS SHOE TO ACQUIRE RATSO’S LIMP.

“Why pebbles? It’s not like you’re playing a role on Broadway for six months where you’re so used to it, limping becomes second nature,” Hoffman told Vanity Fair. “The stone makes you limp, and you don’t have to think about it.”

9. SCHLESINGER OUTED HIMSELF DURING FILMING OF THE MOVIE.

In the late 1960s, one's sexuality wasn't often discussed in the open. But the British director fell in love with Michael Childers, who worked as his assistant on the movie. “We were one of Hollywood’s first out couples,” Childers told Vanity Fair. “He took me everywhere. I felt a little bit uncomfortable at times, but John never did. He said, ‘F*ck ‘em.’”

“John was totally torn up, because part of him wanted to just embrace this, and another part of him was in terror,” the film’s producer, Jerome Hellman, said. “He had these fantasies that if he were openly gay on a film set, that if he tried to give the crew an order, they would turn on him. I said to him, ‘John, look, you’re the director. It’s your movie. I’m the producer, but I’m your partner. There’s nobody who can challenge your authority. If someone speaks out of line to you, they’ll be fired the same minute.’”

10. THE FAMOUS “I’M WALKIN’ HERE” LINE WAS IMPROVISED.

The scene in which Joe and Ratso attempt to walk across the street and almost get hit by a cab was filmed guerilla-style, with a camera in a van across the street. “It was a difficult scene, logistically, because those were real pedestrians and there was real traffic, and Schlesinger wanted to do it in one shot—he didn’t want to cut,” Hoffman explained. “He wanted us to walk, like, a half a block, and the first times we did it the signal turned red. Schlesinger was getting very upset. He came rushing out of the van, saying, ‘Oh, oh, you’ve got to keep walking.’ ‘We can’t, man. There’s f*cking traffic.’ ‘Well, you’ve got to time it.’”

They figured out how to properly time the walk but then almost got run over by a cab. “I guess the brain works so quickly, it said, in a split of a second, ‘Don’t go out of character,’” Hoffman said. “So I said, ‘I’m walking here,’ meaning, ‘We’re shooting a scene here, and this is the first time we ever got it right, and you have f*cked us up.’ Schlesinger started laughing. He clapped his hands and said, ‘We must have that, we must have that,’ and re-did it two or three times, because he loved it.”

11. HOFFMAN THREW UP ON SET WHILE TRYING TO COUGH.

Talk about Method: Ratso has a deadly cough (consumption), and in a particular scene Hoffman got sick in real life. “Because I was so nervous that I was going to come across fraudulent and not have the right cough, I tried to do the cough as realistically as I could,” Hoffman told Vanity Fair. “Each time, I tried to do it more realistically until, finally, I did it so realistically I threw up all over Jon. My lunch came up. All over his cowboy boots. Jon looked down. He said, ‘Man, why’d you do that?’ He thought I did it on purpose.”

12. SCHLESINGER DIDN’T THINK ANYBODY WOULD MAKE THE MOVIE TODAY.

In 1994, the director found himself at a dinner party with a studio executive. “I said, ‘If I brought you a story about this dishwasher from Texas who goes to New York dressed as a cowboy to fulfill his fantasy of living off rich women, doesn’t, is desperate, meets a crippled consumptive who later pisses his pants and dies on a bus, would you—’ and he said, ‘I’d show you the door,’” Vanity Fair reported in 2000.

13. THE SUNDANCE FILM ME AND EARL AND THE DYING GIRL PAYS TRIBUTE TO MIDNIGHT COWBOY.

Me and Earl and the Dying Girl features two friends who turn The Criterion Collection movies into film school comedies. One of those films is Midnight Cowboy, renamed as 2:48 p.m. Cowboy. In the film, Greg (Thomas Mann) and Earl (RJ Cyler) portray Ratso and Buck, respectively. “Midnight Cowboy became my favorite movie,” Cyler said in a featurette on Greg and Earl’s films. “Now I can’t stop watching it. I’m addicted to it. I’ll be in my trailer. ‘RJ, whatcha doing?’ ‘Watching Midnight Cowboy with some ramen noodles right now.’ It’s just so quirky the way the parody was made, and not just because I got to wear a beautiful cowboy hat.”

14. THERE’S A SPEAKEASY BAR IN AUSTIN NAMED AFTER THE FILM.

Midnight Cowboy the bar is located inside a former oriental massage parlor that was busted by the F.B.I., hence the seedy name. It has a red light—not a sign—outside to mark the place. In order to drink there, you need to make a reservation online, and when you get there, you buzz the box and give the password “Harry Craddock.” They have rules, though: no talking on your cell phone inside the bar, and no “excessive displays of public affection.”

15. A CHICAGO THEATER IS TURNING IT INTO A STAGE PRODUCTION.

Chicago’s Lifeline Theatre puts on a lot of literary adaptations, and this February they begin previews for Midnight Cowboy, based on the book. This will be the world premiere adaptation of the novel. The show runs through April 10.