Walmart, which has deployed its financial might to squeeze extra gallons of gas out of its trucks and shave pennies off the price of laundry detergent, did something unexpected this week: It muscled its way into a divisive social debate.

In an announcement circulated and recirculated among incredulous gay-rights advocates, Walmart posted a statement in its Twitter feed that asked the governor of Arkansas, its home state, to reject legislation that critics say could allow discrimination against lesbians and gay men.

The bill’s passage “threatens to undermine the spirit of inclusion present through the state of Arkansas and does not reflect the values we proudly uphold,” Doug McMillon, Walmart’s chief executive, said in the statement on its Twitter account.

“Every day, in our stores, we see firsthand the benefits diversity and inclusion have on our associates, customers and communities we serve,” he said. “For these reasons, we are asking Governor Hutchinson to veto this legislation.”