Sylvester Stallone wasn’t born a leading man. Complications at birth left the son of a hairdresser with nerve damage that slurred his speech and curled his lips into a permanent snarl. His childhood wasn’t easy. His parents fought constantly, and he and his brother slipped in and out of foster care. By high school, they’d moved back in with their mother in Philadelphia, but Stallone’s emotional problems followed him. He struggled academically and was expelled from multiple schools. The arts became his refuge. He spent his free time painting and writing poetry, but his real dream was the silver screen. By the time he was 18, he knew he wanted to act.

Stallone studied drama at the American College of Switzerland and then at the University of Miami, but then abandoned school to pursue a career in New York City. By his mid-twenties, he was getting by on odd jobs like cleaning lion cages and ushering at movie theaters. The bit parts he did manage to land were few and far between. Once, when funds were short, he took a role in an adult film to keep from living in a bus station. When Stallone landed bigger parts, it was because his drooping, stone-chiseled face made him the perfect heavy (Subway Thug No. 1. wasn’t an uncommon credit). By 1975, the 29-year-old actor was desperate for something bigger, so his agent sent him to the L.A. offices of Irwin Winkler and Robert Chartoff, two producers who had a standing deal with United Artists.

The meeting didn’t go as planned. When Winkler and Chartoff met Stallone, they didn’t see a movie star. Dejected, Stallone had his hand on the doorknob when he turned and made one last pitch. “You know,” he said, “I also write.”

The script Stallone turned in was an underdog tale, the story of Rocky, a streetwise palooka who gets an unlikely opportunity to fight the heavyweight champion of the world. But the story of how the film itself got made is even more improbable.

Earlier that same year, a boxer named Chuck Wepner had silenced the world. Pitted 40:1 against the heavily favored Muhammad Ali, Wepner landed a blow that knocked Ali down. Though Ali ultimately knocked out Wepner in the 15th round, Stallone was riveted by those moments in which it seemed like Wepner stood a chance. When he sat down to write a screenplay, it took him just three days to dash it off.

Stallone centered his story around Rocky Balboa, a club boxer plucked from obscurity and eager to go the distance. But Rocky would have the odds stacked against him. Even his trainer, a salty old cynic named Mickey, would write him off—until a once-in-a-lifetime chance to fight against brash champion (and Ali stand-in) Apollo Creed arises.

To ground his story, Stallone drummed up a love interest for Rocky: Adrian, a shy pet store employee. The unlikely romance allowed the film to become as much a character study as a genre slugfest. But when Stallone’s wife, Sasha, read an early draft, she pushed him to sand down his hero’s rough edges even more. In the rewrites, Rocky, who had started out as a violent thug, emerged as a gentle and deceptively wise soul who, in the actor’s words, “was good-natured, even though nature had never been good to him.”

Impressed by the story’s heart, Winkler and Chartoff agreed to produce the film with United Artists, which gave them creative freedom for any picture budgeted under $1.5 million. But the studio balked. A boxing picture and all its trappings—extras, location, and arena shooting—just couldn’t be made for so little money. And with a nobody in the lead role, the flick seemed doomed to box office failure. Chartoff and Winkler countered by offering to make the movie for less than a million, promising to cover any overages out of pocket, and the producers sent the studio a print of Stallone’s recent independent film, The Lords of Flatbush, to seal the deal. With no one in the screening room to recognize him, the executives assumed handsome costar Perry King was the young nobody who had written the script.

Fine, they said. Go make your boxing movie.

The small budget meant that the production team had to get creative. Interiors were shot in L.A., since a full 28-day shoot in Philadelphia was too pricey. Instead, the team spent less than a week on location, quietly shooting exteriors using a nonunion crew. Driving around in a nondescript van, director John Avildsen would spot an interesting locale—a portside ship, a food market—and usher Stallone out to jog, sometimes for miles, while he rolled film. It wasn’t long before the actor gave up smoking.

The slim budget was evident everywhere. Stallone’s wardrobe was plucked from his own closet. His wife worked as the set photographer. But it was more than that— the movie’s finances also meant that the director had to be choosy about how many shots to film. A crucial scene where Rocky confesses his fears about the fight to Adrian (played by Talia Shire) was almost cut before Stallone begged the producers to give him just one take. The scene became the film’s emotional spine.

When the director proposed shooting a date between Rocky and Adrian at an ice rink, the producers laughed. A rink full of extras, combined with the costs of filming all the takes, seemed risky. But when Stallone convinced them of the scene’s worth, they wrote around it. In the movie, Rocky pays off a manager to let the duo skate in an empty rink. The result was easier to shoot and made for a beautiful metaphor: a clumsy dance between two misfits, each holding the other up.

But improvisation wasn’t always an option. For Rocky’s climactic bout with Creed, Stallone and actor Carl Weathers rehearsed five hours a day for a week. Though both were incredible physical specimens, neither had ever boxed and their earliest attempts were exhausting. (Ironically, only Burt Young, cast as Rocky’s sad-sack pal Paulie, had any actual ring experience: He was 14–0 as a pro.) When the director saw their first sparring efforts, he told Stallone to go home and write out the beats. Stallone returned with 14 pages of lefts, rights, counters, and hooks, all delivered using camera-friendly gloves too small to be legal in a real prizefight. As they practiced, Avildsen circled them with an 8mm camera, recording them to point out their weaknesses. He even zoomed in on Stallone’s waistline to remind him he needed to shape up.

Studying all that footage paid off. The fight was shot in front of 4,000 restless extras, corralled with the promise of a free chicken dinner. In the original ending, Rocky walks off with Adrian backstage. But composer Bill Conti’s score was so soaring that the director decided to reshoot the finale, despite having run out of funds. The producers paid for the overage themselves, allowing for the unforgettable final scene: Rocky in the ring, with Adrian fighting through the crowd to reach him, her hat pulled off by a crew member using fishing wire. The image freezes with Rocky embracing her— stopping at what Stallone later called the pinnacle of Rocky’s life. It was the perfect crescendo to an emotional journey—not only for Rocky, but for his alter ego.

The parallels between the actor’s story and Rocky’s were not lost on United Artists’ marketing strategist, Gabe Sumner. A clever publicist, Sumner knew he had quite the task in front of him: selling an old-fashioned boxing movie starring a nobody. Rocky’s competition at the box office didn’t make it any easier. Late 1976 was filled with blockbusters, and Stallone’s hero had to battle with King Kong, a new Dirty Harry sequel, and Carrie for ticket sales.

To compete, Sumner turned up the volume on Stallone’s shaggy-dog story. He sold the narrative about Stallone, a self-made actor-writer who had scraped and clawed his way to the top, as irresistibly American. And he bent the facts a little, too. In Sumner’s version, studio execs offered Stallone hundreds of thousands of dollars to keep the script if they could cast a bankable movie star in the role. The impoverished actor, despite having a pregnant wife and just $106 in the bank, stood his ground. He hitchhiked to auditions. He had to sell his dog. But Stallone wasn’t a sellout, and this was his one chance to break through. The truth, Sumner later admitted, was that the studio had never met Stallone. None of it mattered, though—this was Madison Avenue mythmaking at its best.

The marketing strategy struck a chord. The actor’s tale so perfectly mirrored his onscreen role that the film received significant attention from both the media and audiences. And as word of mouth spread, Rocky became the highest-grossing picture of 1976, earning more than $117 million at the box office (the average ticket price at the time was just over $2). Audiences were equally captivated by the soundtrack. “Gonna Fly Now,” Conti’s trumpet-heavy theme, which accompanied Rocky’s training montage, moved more than 500,000 units.

Though some critics, including The New York Times’ reviewer, panned the flick for its sentimentality, most media embraced it. "Rocky KOs Hollywood," crowed a Newsweek cover. The Academy agreed. At the 1977 Academy Awards, Rocky became the first sports film to win Best Picture, beating out heavy hitters Network, All the President’s Men, and Taxi Driver. Frank Capra and Charlie Chaplin wrote Stallone congratulatory letters. He became a bona fide movie star, anointed by two Hollywood legends who had built their careers making heroes of the common man.

Today, Rocky's boxing trunks hang in the Smithsonian. Wedding ceremonies have been held at his statue near Philadelphia’s Museum of Art. Fans still run up the adjacent steps, mimicking his sprint to glory. As for Stallone, he was inducted into the Boxing Hall of Fame in 2011, making him the only actor ever to receive the honor. In his vision of a gentle slugger searching for an opportunity to shine despite the longest odds, Stallone crafted a story that continues to resonate with millions of moviegoers: It’s the American dream played out at 24 frames per second.

When Sumner’s publicity exaggerations were discovered in 2006, few seemed to care. Perhaps that’s because as a character, Rocky did more than go toe-to-toe with Apollo Creed. At a time when Taxi Driver’s sociopathic antihero Travis Bickle preyed on audience fears and Network played to the bleak pessimism of a struggling nation, Rocky reminded the country what it means to hope. As Sylvester Stallone once said, “If I say it, you won’t believe it. But when Rocky said it, it was the truth.”