Lin-Manuel Miranda Says He Was Going to Scrap ‘Hamilton’ if the Obamas Didn’t Like It (Video)

Good thing those 16 bars played

In Michelle Obama’s new book “Becoming,” the former first lady declares Lin-Manuel Miranda’s smash-hit “Hamilton” to be the greatest piece of art she has ever seen.

And the receiver of those praise took the compliment quite well during Thursday’s “Jimmy Kimmel Live!” revealing that he was gonna rethink the whole thing had the Obamas not liked the first taste he gave them of the Tony-winning musical.

Miranda says Michelle and Barack invited him to an “evening of poetry and spoken word” they were hosting at the White House way before “Hamilton” was more than a working idea.

“I met them when I first performed for them in 2009,” Miranda told Jimmy Kimmel. “It was the first time I had performed anything from ‘Hamilton,’ anywhere. They had asked me to sing something from ‘In the Heights’ and I had 16 bars on Alexander Hamilton.”

Guests for the evening included Spike Lee, Zach Braff, George Stephanopoulos and James Earl Jones — so a pretty good mix to test material on.

“It worked out OK for me? It worked out pretty well,” Miranda said, laughing. “But it was really scary. And I remember thinking, ‘Well if it doesn’t work in this room, I’ll just throw it out and I’ll try something else.'”

Spoiler alert: “It played well!”

“Mary Poppins Returns,” starring Miranda and Emily Blunt, hits theaters Dec. 19.

Watch the video above.