“Don’t care if you’ve tied the knot. / Most folks want what they ain’t got. / Melt the ice, some like it hot. / Let’s be bad.” So sings Ivy Lynn in Smash, NBC’s serial drama about the backstage agonies of putting on a Broadway musical. Ivy has slept with both the show’s director and the fiancé of her main rival — last week’s episode allowed viewers to suspect that she had poisoned the movie star imported to give the show marquee value — and all so this driven performer could escape from the chorus and become a Broadway headliner in her dream role: Marilyn Monroe.

No such machinations were required of Megan Hilty, the actress who plays Ivy. In the City Center Encores! revival of Gentleman Prefer Blondes that opened Wednesday and closes tonight, Hilty has been dazzling Manhattan theatergoers as Lorelei Lee, the role that certified Monroe’s star status. She’s achieved her own Smash.

On its publication in 1925, Anita Loos’s Gentleman Prefer Blondes:The Intimate Diary of a Professional Lady topped the best-seller lists, charming readers and critics alike; Edith Wharton hailed it as “the great American novel.” (Possibly that great American novelist was kidding.) Within a year the property was a Broadway play, and in 1928 it begat a silent film that advertised itself with Lorelei’s famous quote, “It’s sweet when a man kisses your hand, but a string of pearls lasts forever.”

In the 1949 musical adapted by Loos and Joseph Fields, with songs by Jule Styne and Leo Robin, that dictum was put to music: “A kiss on the hand may be quite continental, / But diamonds are a girl’s best friend.” When sung and shimmied by Monroe in the 1953 movie version, that number entered the pop Pantheon, and reestablished its currency when Madonna appropriated the Marilyn ambiance for her 1985 “Material Girl” video: same set, same flaming-pink dress, same hovering gents offering all the baubles of the material world.

Now in its 19th season, the Encores! series has provided New Yorkers with gems all the more precious because they are antique: classic or obscure musicals dusted off and presented in pristine form, with top-flight talent on both sides of the footlights. Earlier this year, Encores! resuscitated Steven Sondheim’s Merrily We Roll Along, turning an old flop into a palpable hit.

John Rando’s production of Gentlemen doesn’t aim at that level of transformation, but it gives audiences the sophisticated pleasure of seeing a 63-year-old show that vamps and prances like the sexiest contemporary ingenue. And in Hilty it has the very image of blond ambition and accomplishment. Scaling the walls of Ivy, the 31-year-old singer-actress went into the show a featured player and comes out a star.

Both a portrait of the giddy 1920s flapper and a preview of the want-it-all women of Sex and the City, the show sends Lorelei and her brunette pal Dorothy Shaw (Rachel York) on the Ile de France from New York to Paris, and back again. Lorelei is pursued, then deserted, then reunited with her rich beau Gus Esmond, Jr. (Clarke Thorell). Dorothy hooks up with bookish Henry Spofford (Aaron Lazar), son of a dotty zillionairess (Deborah Rush). A physical fitness guru (Stephen R. Buntrock) and a titled lecher (Simon Jones) chase the girls around the ship and up the Champs Elysées.

That’s about it for the plot; but a musical comedy doesn’t have to be Dostoevsky. Laughs, sparkle and a few nifty songs will turn the trick. Styne, at the dawn of a Broadway career that peaked with Gypsy, Bells Are Ringing and Funny Girl, composed airs that shrugged off ’20s pastiche for a ’40s big-band sound. And Robin, a veteran of Tin Pan Alley and Hollywood who had co-written famous theme songs for Maurice Chevalier (“Louise”), Jack Benny (“Love in Bloom”) and Bob Hope (Thanks for the Memory”), contributed smart, tart lyrics that were risqué without being risky. From the Gentlemen score, three tunes quickly lodged in the Great American Songbook: “Diamonds,” the lilting ballad “Bye, Bye Baby” and Lorelei’s backstory confession “I’m Just a Little Girl from Little Rock.”

The special verve came from Loos’s notion that, from the 1920s on, women had seized the right to enjoy sex as much as men, and to use it to their advantage. In her two main characters — the men are mere supporting cartoons — Loos presented diverging views on what whoopee was for. Dorothy likes sex because it’s fun. In her signature song, “I Love What I’m Doing,” she avers, “If I had a palm that itches, / I could go from rags to riches, / But I love what I’m doing / When I’m doing it for love.”

More overtly erotic than Dorothy, and way cannier, Lorelei doesn’t give anything away. She’s learned the hard way — being seduced and abandoned by a man back in Arkansas — that sex is a commodity: she’s got it, and men should pay for it, preferably in carats. As she sings in “Little Rock,” “I’ve discovered since then that a girl in love / Usually gets a token of / A man’s appreciation in advance.” She calls Esmond “Daddy,” which sounds faux-infantile but just the way a “professional lady” refers to her sexual sponsor: “I came to New York and I found out / The one you call your Daddy ain’t your pa.”

In one stroke of genius, Loos both created a stereotype — the dumb blond — and smashed it. Lorelei’s curious diction (“A girl like I”) and protestations of dimness (“There are some thoughts a girl’s brain should never dwell on”) hide a keen, cunning intellect. By the end of the show she has not only mesmerized two continents of males but also masterminded a merger between her boyfriend’s button company and the fitness guru’s zipper business. She was Bernard Baruch masquerading as Clara Bow.

Monroe stamped Lorelei as her own, but the role needn’t be inhabited by an ultimate sex symbol. In the 1949 musical that the Encores! production revives, she was played by the angular Carol Channing (later Dolly Levi in the original Hello, Dolly), of whom the show’s musical director, Milton Rosenstock, sputtered, “She can’t sing and she looks crazy.” For Brooks Atkinson, the New York Times theater critic, crazy was rapturous; on opening night he wrote that Channing “goes through the play like a dazed automaton … looking out on a confused world through big, wide, starry eyes. There has never been anything before like this in human history.”

Hilty, a petite, bosomy blond whose work on Smash showcases her gift for finding the core emotional nuances in a lyric, has played iconic roles on Broadway: Glinda in Wicked and the Dolly Parton role in the 2009 musical version of 9 to 5. In her rendition of Lorelei, Hilty is neither mimicking Monroe nor channeling Channing. She may strut carefully across the stage as if she were balancing two Martini glasses on her chest, and amplify her utterances with the sweeping gestures of a teacher reading a fairy tale to kindergarteners; but all the while Hilty proclaims, without winking, that she’s playing a clever woman inside the curvaceous flesh. Her performance reveals the profundity beneath the parody, and functions as an owner’s manual for anyone determined to grab the bras — make that the gold — ring.

In Marilyn’s showstopper number, choreographer Jack Cole had the actress emphasize her alluring body. Singing “we all lose our charms in the end,” she indicates her derriere; at the line “These rocks don’t lose their shape,” she points to her breasts. Hilty skips Monroe’s trilled climactic high note (“Are a girl’s best friend”), replacing Marilyn’s sensational, semi-whispered cooing with a full-throated, brassier reading that is not teasing but testifying — a vamp’s anthem. The Encores! crowd went nuts for Hilty’s “Diamonds,” and Rob Berman’s orchestra obliged several extra choruses of lesser-known lyrics. At the end, when Hilty sang of her men, “But buyers and sighers / They’re such goddam liars,” the place came apart.

This is by no means a one-woman show. Indeed, York as Dorothy may make the more agreeable impression; her throaty contralto puts wit and effervescence into each song. Playing the dance-obsessed Gloria, Megan Sikora pours superhuman energy into a soft, 1920s-style body. In the “Mamie Is Mimi” dance number, accompanied by Phillip Attmore and Jared Grimes (who are meant to recall those tap maestros the Nicholas Brothers), Sikora bursts to life like the prim stenographer who lets loose at the Christmas party. By this time, the middle of Act 2, the show has discarded all pretenses of being a book show. It’s vaudeville on Broadway — or, rather, a block and a half away on 55th Street — and a mid-20th-century call to get happy, which gives a vivaciously communal uplift to this fractious election year.

From the first episode of Smash, Hilty’s Ivy seemed doomed to lose the Marilyn role to Katharine McPhee’s younger, more sympathetic Karen. But that’s just on TV. At Encores! this weekend, Hilty has been anointed the new princess of Broadway. What an Ile de France steward says of Lorelei is as true of Megan: “If you haven’t seen her, you’re certainly missing something.”