JACKSON, Miss. — Just a few weeks ago, as Mississippi lawmakers mobilized to take down the only state flag in the nation with the Confederate battle emblem embedded into it, Gov. Tate Reeves said the choice was not theirs to make.

“It should be the people who make that decision,” Mr. Reeves told reporters then, “not some backroom deal by a bunch of politicians in Jackson.”

But on Tuesday, Mr. Reeves signed into law a measure that removes the flag that has flown over the state for 126 years and been at the heart of a conflict Mississippi has grappled with for generations: how to view a legacy that traces to the Civil War.

The legislation mandates the “prompt, dignified and respectful” removal of the flag, which features the blue bars and white stars of the Confederate battle flag, within 15 days.

Mr. Reeves, a Republican, acknowledged his own evolution from believing the flag should be changed only through a statewide referendum to allowing lawmakers to make the decision.

He said that Mississippi has been buffeted in recent months by flooding, tornadoes and an eruption of violence and discord in state prisons before the outbreak of the coronavirus and the economic devastation it has unleashed. He said that dividing the state, and stirring up an internecine political fight, would only hurt it even more.

Credit…Rogelio V. Solis/Associated Press

“There are people on either side of the flag debate who may never understand the other,” Mr. Reeves said in a speech on Tuesday delivered from the governor’s mansion in Jackson. “We as a family must show empathy. We must understand that all who want change are not attempting to erase history. And all who want the status quo are not meanspirited or hateful.”

Mr. Reeves had previously said he would sign the measure that state legislators approved over the weekend, in another example of Confederate symbols being re-examined following protests over the police killing of George Floyd in Minneapolis.

When the state flag was last on the ballot, in 2001, Mississippi voters overwhelmingly decided to keep it. But over the weekend, the House voted, 91-23, in favor of removing the flag, and the Senate affirmed that decision in a 37-14 vote.

A commission will be charged with introducing a new flag design by September that could be included on the November ballot. The new flag will be forbidden from including the Confederate battle emblem and must include the phrase “In God we trust.”