PLEASANTON -- A man lost consciousness and was rushed to a hospital after his truck spun out of control and rolled through a fence Wednesday just off westbound Interstate 580.

No one else was hurt.

California Highway Patrol officers responded to calls of a vehicle accident near the Hopyard on-ramp around 4:57 p.m. When officers arrived, they found a man pinned inside his truck.

At one point, the man fell unconscious but reawakened as paramedics were attending to him.

The man was rushed to a hospital. The extent of his injuries were unknown Wednesday evening.

The on-ramp to westbound I-580 at Hopyard Road was shut down. Caltrans workers were fixing the fencing the truck crashed through.

Officials did not know what caused the man to crash.

Check back for updates.

Contact Katie Nelson at 925-945-4780 or follow her at Twitter.com/katienelson210.