A Mississippi state flag flies outside the Capitol in Jackson. Mississippi will surrender the Confederate battle emblem from its state flag, more than a century after lawmakers who thought white people were superior to black people embedded it there a generation after the South lost the Civil War. (Rogelio V. Solis/AP)

Mississippi will retire the last state flag in the United States with the Confederate battle emblem, more than 100 years after white legislators who believed black people were inferior adopted the design a generation after the South lost the Civil War.

A broad coalition of lawmakers — black and white, Democrat and Republican — voted Sunday for change as the state faced increasing pressure amid nationwide protests against racial injustice.

Mississippi has a 38 percent black population, and critics have said for generations that it’s wrong to have a flag that prominently features an emblem many condemn as racist.

Democratic Senator David Jordan told his colleagues just before the vote that Mississippi needs a flag that unifies rather than divides.

“Let’s do this because it’s the right thing to do,” Jordan said.

The Senate voted 37-14 to retire the flag, hours after the House voted 91-23.

Cheers rang out in the state Capitol after the Senate vote. Some spectators wept. Legislators embraced one another, many hugging colleagues who were on the opposing side of an issue that has long divided the tradition-bound state.

Republican Governor Tate Reeves is expected to sign the bill into law in the next few days.

Democratic Representative Robert Johnson of Natchez choked back tears as he told reporters that he has seen white colleagues develop more empathy about how the Confederate symbol is painful to him and other African Americans.

“They began to understand and feel the same thing that I’ve been feeling for 61 years of my life,” Johnson said.

A commission will design a new flag that cannot include the Confederate symbol and that must have the words “In God We Trust.” Voters will be asked to approve the new design in the November 3 election. If they reject it, the commission will set a different design using the same guidelines, and that would be sent to voters later.

Legislators put the Confederate emblem on the upper left corner of Mississippi flag in 1894, as white people were taking away political power that African Americans had gained after the Civil War.

In a 2001 statewide election, voters chose to keep the flag. An increasing number of cities and all Mississippi’s public universities have taken down the state flag in recent years. But until now, efforts to redesign the flag sputtered in the Republican-dominated Legislature.

That dynamic shifted as an extraordinary and diverse coalition of political, business, religious groups and sports leaders pushed for change.

At a Black Lives Matter protest outside the Mississippi Governor’s Mansion in early June, thousands cheered as an organizer said the state needs to separate itself from all Confederate symbols.

The battle emblem is a red field topped by a blue X with 13 white stars. The Ku Klux Klan and other hate groups have waved the rebel flag for decades.

Democratic state Senator Derrick Simmons of Greenville, who is black, said the state deserves a flag to make all people proud.

“Today is a history-making day in the state of Mississippi,” Simmons told colleagues. “Let’s vote today for the Mississippi of tomorrow.”