The gunman turned on the video recorder just before 6:45 Wednesday morning and, whispering a single sexist slur, pointed his black Glock at the TV reporter standing in front of him.

Alison Parker, 24, was interviewing the head of the local chamber of commerce live on Roanoke’s “News 7 Mornin’ ” show when the shooting began. Vester L. Flanagan II — an embittered former colleague — would soon post the horror he recorded to Facebook and Twitter. Parker and a cameraman, Adam Ward, 27, died at the scene; the chamber director, Vicki Gardner, 62, underwent surgery and is expected to recover.

The killings were part of what appears to have been an elaborate plot carried out by a troubled man who — after years of professional turmoil and a growing rage he linked to the mass shooting at a Charleston, S.C., church — was determined to wreak vengeance against co-workers he insisted had wronged him.

Flanagan’s scheme began with the legal purchase of his gun two days after the church massacre; included an escape plan that involved ditching one car and fleeing in a rental; and ended when he fatally shot himself during a police chase 200 miles from the site of Wednesday’s carnage.

Authorities have identified Vester Lee Flanagan as the suspect in the shootings deaths of journalists Alison Parker and Adam Ward during a live TV broadcast near Roanoke, Va. (Jorge Ribas/The Washington Post)

The story exploded on social media and dominated cable news broadcasts throughout the day, fueled both by the gruesome footage and by the stories of the two young journalists whose lives were ended.

Ward and his fiancee, who got engaged last year, were on the verge of moving to Charlotte. He had job interviews scheduled for Wednesday afternoon, and the day of his death was meant to be her last working at the station. She witnessed the shooting as it unfolded live on air and was later transported to the hospital.

Parker had just moved in with her boyfriend, who tweeted that the couple intended to marry. A determined reporter, she was a star at the station and seemed destined for an anchor role.

“Alison was our bright, shining light and it was cruelly extinguished by yet another crazy person with a gun,” her father, Andy Parker, said in a statement. “Not hearing her voice again crushes my soul.”

Flanagan, who is black, faxed a 22-page letter to ABC News two hours after the killings. He said the church massacre had, after years of discrimination, sent him “over the top.”

Flanagan, who was fired by CBS affiliate WDBJ7 in 2013, also posted attacks on Twitter against the people he had just killed, asserting without evidence that Parker had made racist remarks and that Ward had complained about him to human resources.

Flanagan, who also went by the name Bryce Williams, had a tumultuous employment history in a journalism career that dates to the mid-1990s.

Dan Shafer, now a TV news director in San Diego, said on the air Wednesday that he hired Flanagan at a Florida station in 1999 and later fired him for chronic “bizarre behavior.”

“He threatened to punch people out,” Shafer said. “And he was kind of running roughshod over folks in the newsroom.”

After he was terminated, Flanagan sued the station, alleging racial discrimination. The case was settled out of court. According to Flanagan’s LinkedIn profile, he went on to other jobs in customer service and news.

In March 2012, he started in Roanoke as a reporter and was fired less than a year later after months of disruptive behavior, according to Jeff Marks, the station’s general manager, who did not offer details.

“Eventually, after many incidents of his anger coming to the fore, we dismissed him,” Marks said on the air Wednesday. “And he did not take that well.”

Flanagan filed an action with the Equal Employment Opportunity Commission and sued the station. In a letter to a judge, Flanagan described what he faced at work as “vile, disgusting and inexcusable,” asserting that colleagues strategically placed a watermelon around the office as a way to torment him.

“I am a very, very persistent person,” he wrote, “and will utilize every resource I have to achieve justice and stand up for the rights of others at the same time.” The lawsuit was eventually dismissed.

After being told he was fired, according to court records, he slammed a door so hard that employees took “shelter in a locked office.” Police were called and, as they escorted him out, he handed a manager a small wooden cross.

“You’ll need this,” Flanagan said.

On Wednesday, he approached his three victims at Bridgewater Plaza — a shopping and entertainment center in Franklin County — as Parker and Gardner discussed the 50th anniversary of the Smith Mountain Lake community. Nearby, Ward panned his lens over the sleepy town below.

None of them noticed Flanagan — standing just feet away — as he raised his pistol and muttered the slur.

Suddenly, though, he lowered the gun and, for 17 seconds, it remained hidden from his video camera’s view.

At that moment, Gardner was gushing about her small town’s progress, saying she wanted it to come together, to grow, to provide visitors a better experience.

“We’re seeing tourism,” she told Parker. “We want the people who come here to say that was . . .

Flanagan fired the first shot, striking Parker in the stomach. She screamed and turned, looking at him with her mouth agape and eyes terrified. He fired again — and again and again. She dropped her microphone and ran.

As the TV station cut its feed and Flanagan’s video went black, he kept shooting. The women wailed. Ward fell to the ground, dropping his camera.

“Oh my . . .” someone appeared to yell, before Flanagan fired more shots — 15 in total — and the victims’ voices fell silent.

He had fled by the time law enforcement officers arrived, triggering an intense manhunt. Authorities said they identified Flanagan as the gunman based on information from the television station.

Just before 11 a.m., authorities said, they found his gray 2009 Ford Mustang at the Roanoke Regional Airport. Flanagan fled the airport in another car — a Chevrolet Sonic, which officials said he had rented earlier in the month. He was tracked in that vehicle along Interstate 81 and later located on Interstate 66 in Fauquier County.

A Virginia State Police trooper using a license plate reader spotted Flanagan’s car at 11:20 a.m.

Less than two miles into the chase, Flanagan ran off the side of the road and struck an embankment. When police approached, they discovered that he’d shot himself.

He was flown to a hospital, where he was pronounced dead at 1:26 p.m.

The killings shattered the tranquility of a lakeside retreat nestled in the Blue Ridge Mountains, which draws vacationers, retirees and Roanoke commuters. In a place where front doors routinely go unsecured, schools and businesses were suddenly on lockdown.

“We don’t have violent crime in our area,” said state Sen. William Stanley (R-Franklin). “We have some property crimes, but even that is few and far between. It’s as close to Mayberry as you can get.”

The reaction from those who had to deal directly with the shooting’s aftermath spoke to just how close the community is.

After updating media on Gardner’s condition, Carilion Clinic spokesman Chris Turnbull noted that Parker and Ward had done a number of broadcasts with the organization in the past two years.

Franklin County Sheriff Bill Overton said he had done an interview with the pair just three weeks ago.

“It really stopped me in my tracks this morning,” he said. “Like many viewers, I was watching this morning’s broadcast and couldn’t understand really what was happening.”

At the station, which has about 50 employees, the news team gathered for a 2:30 p.m. meeting to discuss how to cover the story. Earlier in the day, they came together and sang “Amazing Grace.”

“I’ve been on the other side reporting on these type of incidents,” crime reporter Nadine Maeser said. “It’s strange to find yourself on this side.”

Pamela Cook was among a steady stream of locals who came to the front of WDBJ’s offices to leave flowers and balloons at a makeshift shrine for the slain journalists.

She would send her kids to school, pop into her recliner and, nearly every day, watch segments by Parker and Ward.

“It was kind of like Folgers,” Cook said. “I started my day with them.”

Regardless of her mood, Cook said, an hour of watching the morning news — particularly the on-air antics — would lift her up.

“They were part of the family,” she said. “They were in your house every morning.”

She laid two sunflowers at the memorial for Parker and Ward because they were “rays of sun.”

A sign left at the memorial featured pictures of Parker and Ward. It read: “Shining stars. Beloved in this community. We grieve your deaths and will hold you dear in our hearts always.”

Nearby, satellite trucks from both regional and national news outlets crammed into the TV station’s parking lot.

Cox and Hedgpeth reported from Washington.

Mark Berman, J. Freedom du Lac, Mary Pat Flaherty, Caitlin Gibson, Dana Hedgpeth, Arelis R. Hernández, Jennifer Jenkins, Wesley Lowry, Dan Morse, Antonio Olivo, Jenna Portnoy, Michael E. Ruane, T. Rees Shapiro, Victoria St. Martin, Julie Tate, Laura Vozzella and Mason Adams contributed to this report.