By JONATHAN DREW and ALAN SUDERMAN

MONETA, Va. — Vester Flanagan appeared to become increasingly volatile in recent years, picking fights with co-workers and others he encountered over seemingly mundane events or perceived slights and culminating with the on-air slaying of two former colleagues who he believed had wronged him.

Flanagan’s own descriptions of his motive are somewhat inconsistent: A rambling 23-page manifesto sent to a national news network described it as revenge for what police have called the racially motivated killings of nine black people inside a church in South Carolina. On social media, he suggested his victims, 24-year-old Alison Parker and 27-year-old Adam Ward, had wronged him in the past.

The ambush appeared to be carefully planned; Flanagan had contacted ABC News weeks ago with what he claimed was a story tip, had rented what he ultimately used as a getaway car and was carrying possible disguises: extra license plates, a wig, shawl, sunglasses and a hat. After the killing, he texted a friend suggesting he had “done something stupid,” investigators wrote in a search warrant.

Flanagan’s grudge against the local station dated to 2013, when he sued WDBJ a month after he was fired, claiming racial discrimination.

Court documents show the station fired Flanagan for poor performance and an unending stream of conflicts with co-workers. Within two months of starting at WDBJ, he was written up for inappropriate behavior, court documents show.

News director Dan Dennison wrote that Flanagan made co-workers feel threatened or uncomfortable, in one case losing his temper in a live truck. In another, photographers said he complained about shaky video without having seen it.

When he was fired in February 2013, company memos say he refused to leave and the station called 911 to have two police officers escort him out of the building. A human resources representative, Monica Taylor, reported in a memo that Flanagan said, “I’m not leaving. I’m going to make a stink and it’s going to be in the headlines.”

As Flanagan was being escorted out, he put a wood cross in Dennison’s hand and told him: “You’ll need this,” according to Dennison.

During the incident, Flanagan complains about Ward, who is recording the altercation, and insults him.

Flanagan’s lawsuit claims the station’s photographers conspired against him because of his race, noting a watermelon at the station that he perceived as a racial slur directed at him.

He asked for a jury trial, with a jury entirely comprised of black women. A judge dismissed the case in July 2014, a week before the trial.

Station general manager Jeffrey Marks said Flanagan raised no red flags when he was hired, getting positive references and passing background checks. But then things went amiss when his performance failed to improve, and on one story he failed to check his facts, Marks said. Then, he accused a news photographer of going on private property. He was fired after he confronted an anchor who was assigned to review his story.

“We are still at a loss to know what happened to him in these 2-and-a-half years,” Marks said Thursday during a news conference, where station staff wore ribbons to represent their slain colleagues.

Flanagan had other run-ins after his time at WDBJ. Heather Fay, general manager at a Jack Brown’s beer and burger restaurant, said she received a 15- to 20-page letter from Flanagan three or four months ago criticizing the staff for telling customers to “have a nice day” instead of “thank you.”

“You could tell he was really angry,” Fay said. “It was bizarre, for sure.”

Fay, who said she threw the letter out shortly after receiving it, wrote down Flanagan’s name and a general description of his letter in her manager’s notebook. While she had never received anything like it before, she said there was no indication the letter’s author was contemplating a crime.

“I thought the guy had a lot of time on his hands,” Fay said.

After Flanagan was fired from WDBJ-TV in 2013, he began working at a UnitedHealthcare call center in Roanoke, where a former co-worker said she had a frightening encounter with him.

Michelle Kibodeaux, 46, said Flanagan was loud and boisterous, with a booming laugh. He often remarked on how quiet she was, she said.

“One day he was being quiet, and I told him, ‘You’re being quiet today. The shoe’s on the other foot.’ He said, ‘You don’t know me well enough to judge me.’”

Kibodeaux said she turned to walk away and Flanagan tried to grab her by the shoulder, but she ducked under his hand.

“He said, ‘Don’t you walk away from me. Don’t you turn your back on me,’” she recalled.

“I said, ‘This is not going to happen.’ And he said, ‘Don’t you ever speak to me again,’” Kibodeaux said.