The actors onstage reached for their pockets, each pulling out and then unfurling a Kenyan flag before a hushed crowd that packed the theater.

Then, in a solemn and chilling delivery, they began reciting the names of the dozens of people they say were killed by security forces in the monthslong mass protests that have convulsed Kenya. As they waved the flags, several members of the audience wrapped their own flags around themselves, some weeping quietly.

“The flag is no longer a cloth that flaps overhead and that is detached from the people,” Ngatia Kimathi, one of the actors in the play staged in the capital, Nairobi, said in an interview.

“The flag has become a symbol of unity and a symbol of the people’s power,” said Mr. Kimathi, who had been arrested in the protests. “In these times of death but also hope, everyone is holding onto it.”

Kenya has strict legal limits on the use of its national flag, which features two crossed spears and a shield against stripes of black, red, green and white. The law specifies that the flag is to be displayed only on government properties or on public holidays and that violators can be prosecuted. The rules were first introduced in the 1960s to limit the desecration of the flag — and a proposal to amend them several years ago never passed the Senate.