INDIANAPOLIS — Roman Catholic nuns and brothers in robes along with conservative activists and lawmakers, all surrounded Gov. Mike Pence of Indiana last week as he signed what was billed as a religious freedom law. Smiling and proud, some of them had cheered the bill as a way to protect religious business owners from having to provide cakes and flowers to same-sex weddings.

But on Thursday, as the state’s top Republican legislative leaders here announced they were changing the law to specify that it will not authorize discrimination because of sexual orientation or gender identity, a far different cast stood behind them, including a prominent gay businessman and corporate leaders from Eli Lilly, the Indiana Pacers and the Indiana Chamber of Commerce.

And this time, the mood was tense: There were simple nods of support, no wide smiles.

The shift in Indiana has played out with remarkable speed, and under the shadow of a soon-to-arrive Final Four men’s basketball tournament and the national attention that promises. For a place that a little more than a year ago appeared headed toward enshrining a same-sex marriage ban in its Constitution, the winds have shifted swiftly, leaving some conservative Christian leaders unsettled and uncertain about what may come next for state laws focused on what is called religious freedom and the alliance that adopted that phrase as its battle cry.

Religious conservatives and some Republican political operatives now describe what occurred here as a major setback. For years now, they have been using “religious freedom” as a slogan and the legal answer to the growing gay rights movement. With same-sex marriage racking up one win after another in the courts and in public opinion, the conservatives say they believed their strategy of passing religious rights laws seemed like a consensus solution as American as Abe Lincoln.