The first of two acts of this new play by Theresa Rebeck invites us all into a rehearsal for “Hamlet” with a company of actors working hard to support Sarah Bernhardt, as played by Janet McTeer.

Fitz Paton’s original music whirled us on to the stage of a Paris theater in 1897 when Bernhardt was 53 years old and about to open as Prince Hamlet of Denmark, who was written by Shakespeare to be a young man battling depression over the recent death of his father.

Janet McTeer is also in her mid-50s; she is slim, tall and fair; more suited to play a male who is young, for the prince is dealing with grief for the first time in his life. Playwright Rebeck’s play is truly a fictional documentary, at least in its long first act, for its story does not advance much until the second act begins.

During its first hour, we learn of megastar Bernhardt’s total commitment to her long and complex role, and we watch as the diva exerts her influence on this production in all its aspects. She is the owner of her own theater; she is the producer and the director and she has full control over the design of the sets, costumes, and art work on the promotional posters. She is in perilous financial straits, for her last outing in a play by Edmond Rostand (her favorite writer and her lover) was a painful commercial failure; and most of her personal fortune went down with it. “Hamlet” does not only offer her a great role with which to turn her career around, it also challenges her audiences to accept her as a young male who is struggling with his inner rage over his beloved mother’s too-soon marriage to his Uncle Claudius, his late father’s brother.

There is much in this first act to delight us. Ms. McTeer towers over her fellow players (she’s just over 6 feet tall) and she has all the assets of a great personality star. Her trim body with its loose limbs, combined with her warm and supple face, give her all the tools she needs to transform herself into a young man. What I mean by “personality star” is that she has abundant star quality, which makes her fascinating to watch and to follow through in all of her stage outings. As with so many of her predecessors in this category, she is more effective when her presence, her energy and her fluid movements are available to us through the personal contact of theater.

Through the years, stars like Tallulah Bankhead, Lynn Fontanne, Ina Claire, Katherine Cornell have all had the ability to leave their roots to devote themselves not to the large or small screen, but to the very demanding world of live theater. When Stanislavski and later the Group Theatre and the Actors’ Studio began to exert influence over stage actors, plays were written to accommodate realism and sense memory. But through Sarah Bernhardt’s era, until the 1930s, Bernhardt reigned supreme as a critical and popular favorite who rarely made a misstep. It was Ms. Rebeck’s choice to pick her up just after that misstep in which she’d lost a fortune, which raised the stakes on the commercial viability of her follow-up with “Hamlet.”

In the second act, when she asks Edmond Rostand to remove much of Shakespeare’s poetry without changing any of his plot, there is much conflict; and the sparks do fly. I think too much time is spent debating this issue because she will be playing “Hamlet” in French, and Shakespeare’s iambic pentameter will be gone anyway. In any case, her demand infuriates Rostand to the point where he refuses.

We benefit because it leads to an excellent scene between Rostand’s wife Rosamond and Bernhardt (beautifully played by Ito Aghayere and McTeer) which crackles because it probes for truth and finds it for both characters.

Also, Dylan Baker’s performance as Constant Coquelin, a leading actor in the company, as well as that of Jason Butler Harner as Rostand, are first rate. They join the rest of the excellent cast in making us listen to and often laugh with the other characters. That includes Tony Carlin as critic Louis, Nick Westrate as Bernhard’s illegitimate son Maurice, and Matthew Saldivar as the artist who finally delivers the poster that properly reflects the star’s vision.

Beowulf Boritt’s settings of the theater, of Bernhardt’s dressing room and of other bits of Paris are evocative, moody and helpful in showing us the turn of that century, when the City of Light flourished. Moritz von Stuelpnagel’s direction is fluid and focused which is characteristic of his excellent work on “Present Laughter” and “Hand To God” among others. Toni-Leslie James as costume designer adds further help with the clothes that Bernhardt-Hamlet wears and Ms. McTeer fills them admirably and with great flair. Matthew Armentrout’s wig finally tops her off very well and completes her transformation into the Prince of Denmark.

Theresa Rebeck has proved to be prolific and continues to write plays of substance; sometimes provocative, always entertaining. Here she is writing about sacrifice to achieve change, and the courage to fight tradition in order to be in charge of one’s own legacy. If her play is unusually structured and occasionally unclear — as my companion said as we left the theater: “Well, you can’t make a Hamlette without breaking a few eggs.” I can’t top that.

American Airlines Theatre

227 W. 42nd Street

Opened Sept. 25; closes Nov. 11

2 acts, 2 hours 15 minutes