COLUMBIA — Thousands of mourners on Wednesday streamed past the open casket of Clementa Pinckney, the esteemed pastor and state senator who lay in state under the Capitol dome a week after he and eight others were slain at a historic black Charleston church.

Pinckney’s widow, Jennifer, two young daughters, Eliana and Malana, other family members and lawmakers he served with during nearly two decades in the Legislature stood by the casket greeting those paying their respects. Portraits of Pinckney, who was dressed in a black suit and red tie, stood on either side of the casket.

Pinckney made his final journey to the Statehouse by horse-drawn caisson as lawmakers lined up along the top of the Capitol steps to watch the slow approach on Main Street from Leevy’s Funeral Home.

The procession followed a paved path around the west side of the Statehouse grounds. Gov. Nikki Haley watched as nine state troopers in wide-brimmed hats hoisted the casket and carried Pinckney into the Capitol as the crowd outside sang “We Shall Overcome.”

Pinckney, pastor of Emanuel AME Church, and other ministers and parishioners attending evening Bible study June 17 at his church died in a mass shooting. The nine were killed in a hail of gunfire by a 21-year-old avowed white supremacist who wanted to kill blacks and start a race war, authorities said.

President Barack Obama will deliver the eulogy at Pinckney’s funeral in Charleston on Friday and plans to meet with the families of the nine victims, according to a source close to those planning the services.

As Pinckney’s casket disappeared inside the Statehouse, mourners, including Edna Nesbit of Hollywood, called out, “God bless you.”

“We were just so heartbroken that we had to come here,” Nesbit, 67, said later. “It’s just so nice to see the respect given to a man who died too early and for no reason — just racism.”

For two hours before the Capitol opened to mourners, people formed a line that would snake from a side entrance, around the building and down Sumter Street. One of them was Queen Palmer, 62, of Columbia, who had followed the procession.

“What happened was sad,” she said. “But this is good because everyone is coming together — both black and white. They’re coming together, and that’s what we need right now.”

More than 500 people were still in line at 5 p.m., when the viewing was scheduled to end.

Among those still waiting was Ann Shepard, of Columbia, who had known Pinckney for more than 20 years. It had been “a very difficult day,” she said.

“It’s going to be a while before people can process this,” Shepard said. “It’s not going to be overnight. This is going to go on for a long time.”

Frances Washington, 57, of Greenwood, said the wait was worth it to bid farewell to her “loyal, faithful, truthful” college classmate at Allen University.

“This won’t be in vain,” Washington said. “Something good will come of it.”

For privacy, a black drape covered the large second-floor lobby window where Pinckney lay in state. It also blocked the view of the Confederate battle flag atop a 30-foot pole at a Confederate Soldier Monument on the Statehouse grounds. The rebel flag has become a flashpoint in South Carolina and beyond since the killings.

Hundreds have rallied at the Statehouse demanding that the flag be removed as a symbol of racism. Their calls have been joined by a growing number of state officials, including Haley, businesses and civil rights activists. A photo on a website linked to the accused killer, Dylann Roof of Eastover, shows him holding a Confederate flag.

Pinckney’s casket passed the spot where the Confederate flag flew. House Democrats had earlier urged Haley to order that flag taken down temporarily under a provision that allows for it to be replaced when it is worn. Haley declined, saying she would be violating state law by making the claim.

Pinckney made history as the youngest African-American elected to office when he won a House seat at age 23. On Wednesday, he became the second African-American to lie under the dome since Reconstruction. In 1986, the body of astronaut Ronald E. McNair, who died in the space shuttle Challenger explosion, was given the same honor.

House members and senators took turns standing by the casket. Each senator donned a blue-and-white ribbon with the state crescent, symbolizing unity, made by Lexington Republican Sen. Katrina Shealy.

Pinckney’s Senate deskmate, Vincent Sheheen, D-Camden, was among those who greeted mourners. He said Pinckney’s death has affected even those who didn’t know him.

“I think everybody is still just coming to grips with the fact that this has really happened — that it’s real,” Sheheen said as he began to weep. “I keep waiting for him to get up.”

EDITOR’S NOTE: Earlier versions of this story incorrectly stated that Pinckney was the first African-American to lie in state under the capitol dome since Reconstruction. In 1986, the body of astronaut Ronald E. McNair was given that honor.