MEXICO CITY — Cubans voted to approve a new constitution, the government announced Monday, but the growing boldness of those opposing its policies seemed to overshadow the modest legal changes that were on the ballot.

Nearly 87 percent of Cubans who cast ballots voted “yes” in Sunday’s referendum, the National Electoral Commission said, according to Cuban media reports. But about 15 percent of voters stayed home, and those Cubans, along with the ones who voted “no,” represented an unusual show of opposition in the one-party state.

While the final result presents no real challenge to the leadership of President Miguel Díaz-Canel and the continued control of the Cuban Communist Party, it reflects the growing confidence of diverse groups that have pushed back against official decisions in recent months and forced the government to negotiate.

Evangelical groups protested a provision in the proposed constitution that would have legalized same-sex marriage, artists demanded the repeal of a decree they said would give the government more power to censor them, and small private businesses bristled at new regulations.