Penn Badgley almost wasn't cast as Dan Humphrey in 'Gossip Girl'

"Gossip Girl" helped launch the careers of many young actors including Penn Badgley.

He played "lonely-boy" Dan Humphrey who was desperately in love with Blake Lively's Serena Van Der Woodsen but according to casting director, David Rapaport, he had someone else in mind for the part.

“Before Penn was involved, I desperately wanted Alden Ehrenreich to play Dan,” he told Entertainment Weekly in an interview published on Thursday. Ehrenreich came in to read for the part but producers thought he was too short to star opposite a statuesque Lively.

PENN BADGLEY WAS 'TROUBLED' BY NEW ROLE, TALKS 'GOSSIP GIRL' COMPARISONS

Badgley wound up playing Dan for six years, which remained his only series-regular part in a TV show until Rapaport called him up to play stalker and serial killer Joe Goldberg on Netflix's "YOU."

Penn Badgley (right) with his former "Gossip Girl" castmates.

Penn Badgley (right) with his former "Gossip Girl" castmates. (Getty)

“I didn’t think he would do it,” Rapaport told the magazine of tackling Joe. “But once we got the idea in our heads, it all made sense. I can’t imagine anybody else playing that character.”

And Ehrenreich's career didn't end there. He went on to play a young Han Solo in the prequel "Star Wars" movie, "Solo: A Star Wars Story."

MILLIE BOBBY BROWN DEFENDS PENN BADGLEY’S CREEPY 'YOU' CHARACTER, FACES BACKLASH

Rapaport said Lively was an immediate yes, though. "[The network was] looking for someone who was casually cool, effortlessly chic, and — as a performer — was able to access their feelings,” Rapaport revealed. “I was looking for this perfect person that would deliver on every level.”

The casting pro said he saw Lively in the 2005 movie "The Sisterhood of the Traveling Pants." “I did not have another choice,” Rapaport said. “I knew in my heart there was no one else.”