An apparently suicidal knife-wielding man who prompted the closure of Highway 60 — in both directions — through Ontario was arrested Tuesday night, Caltrans officials say.

A SigAlert was issued at 6:46 p.m. at Highway 60 and Euclid Avenue.

“He has a 6- to 8-inch knife,” said Caltrans spokeswoman Terri Kasinga, shortly after 8 p.m. “He’s very distraught.”

He was arrested about 10 p.m. KABC-7 reported police used a Taser to subdue the man. Lanes opened shortly before 11 p.m.

The man had been moving between the freeway lanes and the Euclid Avenue under-crossing, closing both roadways in both directions.

Police and California Highway Patrol officers were assigned to the incident.

As she spoke, the man was standing on the freeway guardrail over Euclid Avenue.

The freeway backup is roughly five miles in both directions — from Interstate 15 to Highway 71.

Calls to Ontario police were not immediately returned.