Officers Juan Gonzalez and Brian Law were responding to a crash that occurred around 6 a.m. near Kingsburg (map), the CHP confirmed.

A dispatch call had come in stating a collision was blocking northbound lanes of State Route 99 near Sierra Avenue, but when officers arrived on scene, the crash turned out to be blocking lanes on the southbound side of the highway, CHP Capt. David Paris told news media on Monday morning.

A pedestrian, one of the people involved in the crash, was out of his or her vehicle, Paris said.

The officers’ vehicle swerved to avoid hitting the pedestrian and then crashed, the Fresno Bee reported.

“Our vehicle lost control, collided into the guard rail,” Paris said.

Two California Highway Patrol officers were killed in a traffic accident Monday in Fresno County, Feb. 17, 2014. (Credit: KFSN)

Just after noon, CHP tweeted out the names of the officers, who were partners.

“This is a very sad day for us at the CHP as we say goodbye to two valued members of our family,” stated a California Highway Patrol Facebook post.

In a statement from Gov. Jerry Brown, Law was described as a 34-year-old from Clovis, and Gonzalez as a 33-year-old from Fresno.

Both graduated from the CHP academy in April 2008, according to the governor’s statement. Gonzalez had worked in CHP’s Oakland Area Office before being transferred to the Fresno Area Office; Law had previously worked in the San Jose Area Office.

Flags at the state capitol were to be flown at half-staff, Brown said.

“Anne and I extend our deepest condolences and sympathies to the families, friends and colleagues of Officers Law and Gonzalez as they mourn the tragic loss of these dedicated public servants,” Brown said. “We join all Californians in honoring these officers for their courage, commitment and service.”

Law was survived by his wife Rebecca and three children, Brandon, Lauren and Samantha, while Gonzalez was survived by his mother Maria and sister Sandra, according to the governor’s office.

A description of the crash posted to Facebook by a nonprofit organization that supports the families of fallen officers stated that the chain-reaction collision occurred after the driver of a Ford F150 fell asleep at the wheel. The post, from Police and Fire: the Fallen Heroes, was shared by CHP Castro Valley.

The southbound 99 was closed at Bethel Avenue, on the north side of Kingsburg, for several hours amid an investigation, the CHP stated. The area is about 200 miles north of Los Angeles.