Authorities say a 39-year-old man wanted for a fatal hit-and-run in Long Beach was killed by Border Patrol agents in Riverside County after he allegedly attacked them with a sword.

The bizarre saga came to an end at about 7:10 p.m. on July 10, when agents in Blythe – a city on the California-Arizona border in eastern Riverside County – attempted to pull over a car driven by 39-year-old Kenneth Richard Sok of Long Beach, said Michael Wisniewski, assistant chief of the Border Patrol’s Yuma Sector.

It’s not clear why agents tried to pull over Sok or if it was for immigration enforcement.

Wisniewski declined to say why agents initiated the stop, but said they later learned that Sok was from Oregon.

Instead of pulling over, Wisniewski said, Sok took off. During the ensuing pursuit, Sok struck a pedestrian, who had to be airlifted to a hospital for treatment, Wisniewski said. (An update on that person’s injuries was not immediately available.)

Eventually, Sok pulled over and got out of his car wielding a sword, Wisniewski said.

Wisniewski said Sok then charged at agents, prompting them to open fire. Sok was pronounced dead at the scene, he said.

One agent was taken to a hospital for treatment of non-life-threatening injuries from the sword attack, Wisniewski said.

After Sok’s death, detectives with the Long Beach Police Department connected him to a hit-and-run crash that left a bicyclist dead four days prior in West Long Beach, according to a statement from the LBPD.

In that crash, which happened at about 2:38 a.m. near Cowles Street and Santa Fe Avenue, detectives allege Sok was making a right turn onto eastbound Cowles Street when he struck a bicyclist who was riding westbound on Cowles Street.

The Los Angeles County Medical Examiner later determined that Sok “intentionally struck” the victim and ruled the manner of death as a homicide, police said.

The victim of that crash was identified as Gerardo Mejia, a 51-year-old man who was homeless, police said.