SPEARFISH, S.D. — The hand-printed sign on the door of the Matthews Opera House, a jewel box theater that anchors Main Street in this city of 11,000 in the northern Black Hills, proclaimed some surprising news this month about “Hamlet,” its first Shakespeare offering in two years.

“Sold Out!”

Inside, the first big cheer of the night came even before the ghost of Hamlet’s father appeared at Elsinore in Act I, when Sian Young, the theater’s executive director, thanked the National Endowment for the Arts for its support.

“Shakespeare is alive and well in Spearfish!” Ms. Young told the audience, which included several families taking children to see their first “Hamlet.”

South Dakota, a largely rural, politically red state that voted decisively for Donald J. Trump in November, is also a prime recipient of money from the very arts endowment that the president wants to eliminate. If any state knows the value of publicly financed art, it may be South Dakota: One of its biggest tourist attractions, Mount Rushmore, is, among other things, a colossal federally funded sculpture.