Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A man claiming to be the gunman in the Virginia TV news shootings wrote in a chilling letter that he was pushed "over the top" by the Charleston church massacre and expressed admiration for the killers from Virginia Tech and Columbine.

In a 23-page fax to ABC News and a follow-up call, both after the attack, the man identified himself as Vester Flanagan and as Bryce Williams. He said he suffered racial discrimination and bullying at work and was attacked for being black and gay.

"The church shooting was the tipping point," he wrote, according to ABC News, "but my anger has been building steadily ... I’ve been a human powder keg for a while ... just waiting to go BOOM!!!!"

Image: Bryce Williams from his Twitter account profile via Twitter

ABC said the fax arrived about two hours after a reporter and cameraman were shot to death on live television Wednesday morning in Moneta, Virginia. The gunman killed himself later while he was being chased by authorities.

The sheriff identified the killer as Flanagan, a former TV news reporter himself who went by Bryce Williams on-air. The Virginia station, WDBJ, said he was “difficult to work with” and was fired for anger problems.

Killed were reporter Alison Parker, 24, and cameraman Adam Ward, 27. The woman Parker was interviewing, local businesswoman Vicki Gardner, was shot and was in stable condition after surgery.

The shots were fired during a remote segment on WDBJ's morning show. As he fell, Ward captured an image of the gunman.

Flanagan, 41, recorded video of the shootings and posted them to his Facebook and Twitter accounts hours later, while he was being pursued by law enforcement. Those accounts were quickly taken down.

ABC turned the letter over to authorities immediately. The network said the person who sent it called later in the morning, confessed to shooting two people, said the authorities were after him, and hung up.

In the letter, which ABC described as rambling, the man wrote that he put a deposit down for a gun on June 19, two days after the killings in Charleston. He mentioned Charleston shooter Dylann Roof’s desire for a race war.

He expressed admiration for Eric Harris and Dylan Klebold, the killers from Columbine High School in 1999, and for Seung-Hui Cho, who killed 32 people at Virginia Tech in 2007.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

In one part of the document, the man described it as a "suicide note for friends and family."

Related: How Colleagues Are Remembering Slain Journalists

Flanagan's family reacted with sadness and grief over the shootings Wednesday.

"It is with heavy hearts and deep sadness that we express our deepest condolences to the families of Alison Parker and Adam Ward. We are also praying for the recovery of Vicki Gardner," Flanagan's family said in a statement to WBDJ.

"Our thoughts and prayers at this time are with the victims' families and the WBDJ7 NEWS family," the statement said. Words cannot express the hurt that we feel for the victims."

The man who sent the letter to ABC also wrote that he had been sexually harassed and attacked by black men and white women.

Flanagan had a long and troubled career on air at local television affiliates around the United States.

In 2000, he was let go by WTWC, the NBC affiliate in Tallahassee, Florida. The station, which stopped airing newscasts that year, said it was downsizing. Flanagan sued in state court, alleging discrimination.

In the suit, Flanagan alleged he was called a "monkey" by a producer, and that a supervisor said Flanagan was an "exception" among African Americans because "blacks are lazy and do not take advantage of free money."

WTWC denied the claims, and it accused him of profanity and “misbehavior with regards to coworkers.” The court files have been purged but were reposted by the Tallahassee Democrat newspaper on Wednesday.

The general manager of WDBJ, Jeff Marks, said on the station’s noon newscast Wednesday that Flanagan had a reputation of "being difficult to work with" and was fired because of anger problems.

Marks said Flanagan was fired after "many incidents of his anger coming forward" and was escorted from the building by police. He worked at WDBJ for less than a year, from March 2012 to February 2013.

Flanagan got into a series of confrontations with another reporter and two photographers, as well as other employees, according to employment records.

"Bryce had told me he felt like he wasn’t being treated fairly at Channel 7, that there was discrimination," Orlando Salinas, who worked at the station, told NBC News. Some arguments with management "were very loud and verbal and people could hear yelling from behind closed doors," he said.

Salinas said that several months before Flanagan was fired, Flanagan sent Salinas an email that "sounded threatening" and contained "ugly sexual innuendo." He reported the email to management.

Flanagan was fired on Feb. 1 "due to unsatisfactory job performance and inability to work as a team member." He did not go quietly. According to station files, Flanagan stormed out of his termination meeting — causing members of the sales team to lock themselves in an office — and threw a ball cap at another employee. Police were called and removed him from the building.

Station employees were told to "call 911 immediately" if they saw Flanagan on company property, according to employment files. Off-duty officers were stationed outside the building for two days after his termination.

After the shooting, during the police pursuit, Flanagan posted on social media that Parker, the reporter, had made racist comments and that Ward, the cameraman, had spoken to human resources about him after working with him just one time.

A woman who worked with Flanagan in the late 1990s said Wednesday she couldn’t believe the news. Tarcia Bush, who worked with Flanagan at WTOC-TV in Savannah, remembered him as a "good guy" who frequently joked with other employees.

"When I worked with him he was such a mild-mannered guy," Bush, who now works at NBC station WSAV, also in Savannah. "That guy that did this this morning is not the guy that I knew," she said. "I don’t know this man."

Flanagan was ambitious and wanted to move to a bigger market, Bush said, and he left for a job at a Florida TV station, she said. There, his joking nature apparently changed.

Kimberly Moore Wilmoth worked with Flanagan at a Tallahassee TV station. She described him to The Associated Press as "off-kilter" and a loner, and said that "he didn't laugh at our jokes or at himself when he would make a mistake."

Don Shafer, who is now news director at XETV in San Diego, hired Flanagan at the Tallahassee station and later fired him for "odd behavior" and a tendency to get into arguments with other employees.

"He was a good on-air performer, a pretty good reporter. And then things started getting a little strange," Shafer said told the San Diego station in an interview.