The U.S. authorities arrested a 30-year-old Washington State resident on Tuesday on charges of conspiring to commit a school shooting in rural British Columbia, eight months after a Canadian teenager killed eight people.

On Feb. 10, Jesse Van Rootselaar, 18, shot and killed her mother and 11-year-old stepbrother in Tumbler Ridge, British Columbia, a tranquil mountain town. She then went to the local school and shot and killed five students and one educational instructor. She died in the school of a self-inflicted gunshot wound, and her death prompted the Royal Canadian Mounted Police to announce they were not searching for any other suspects.

But on Tuesday afternoon, officials from the Federal Bureau of Investigation, Royal Canadian Mounted Police and the U.S. Department of Justice announced that another person had, for months, been in contact with Ms. Van Rootselaar to plot the shooting. That included sending cash — about $100 for a pair of loafers and $15 for a lighter — to Ms. Van Rootselaar, as well as dispensing technical advice on how to carry out the attacks.

The suspect, identified by the police as James Cody Bryant, of Bellingham, Wash., was arrested on Tuesday morning, the authorities said at a Seattle news conference. Officials said that the suspect, who was born male and was referred to by authorities with male pronouns, identifies as female, similar to the shooter, Ms. Van Rootselaar.

Ms. Van Rootselaar and the suspect met about three years ago on Omegle, a chat website that connects strangers. After the website shut down in 2023 amid criticism that it was a haven for sexual abuse, the pair kept in touch, said Mike Harrington, a special agent in charge of the F.B.I. Seattle field office.

Their friendship developed over conversations about planning the shooting that began at least six months before the attacks, including communication on Discord, a social media platform. Ms. Van Rootselaar was also active on various other social media accounts, where she documented her fascination with firearms and her mental health issues, for which she took prescribed medications and experimented with psychedelic drugs and other illegal substances.

The suspect, the authorities said, helped Ms. Van Rootselaar test livestreaming equipment, promised to help distribute and amplify footage taken during shooting, and advised how to start the car that Ms. Van Rootselaar used to travel from her home to the school.

“Without Bryant’s misplaced loyalty and willingness to operate the livestream, we don’t ultimately know if the shooter would have gone through with the crime,” said Mr. Harrington, adding that he was disturbed by messages between the pair. He said that they were difficult to read, “in part because of the casual tone these two individuals used when discussing the mass taking of innocent lives.”

The suspect was committed to assisting Ms. Van Rootselaar and stayed awake after an overnight shift to test the livestream. But during the actual attack, the stream lasted only 20 seconds before failing and was seen only by the suspect, said Charles Neil Floyd, the acting U.S. Attorney for the Western District of Washington.

The shooting in Tumbler Ridge shattered the quiet community of 2,400 people, and the school was later demolished. In addition to the eight people who were killed, two students were critically injured but survived, including a girl who was shot three times at close range.

In the months since the shooting, more than 30 lawsuits have been filed against OpenAI, an artificial intelligence company headquartered in San Francisco, following revelations by The Wall Street Journal that the company had internally flagged Ms. Van Rootselaar’s ChatGPT account for violent comments. Despite internal debate about how to proceed, the company chose not to escalate the complaint to the Canadian authorities and instead shut down Ms. Van Rootselaar’s account, though she was able to activate another one.

British Columbia last month filed a lawsuit against OpenAI in California, asserting that the shooting could have been prevented if the company had taken timely action. Sam Altman, the chief executive of OpenAI, apologized to the province in the months after the attacks and reasserted his company’s commitment to A.I. safety regulation, though David Eby, the premier of British Columbia, said those conversations had since stalled.