Witnesses say one of the trains was stopped, and the other train hit it as it emerged from a tunnel connecting downtown San Francisco to the city's western neighborhoods.
The trains were full of riders, but there are no life-threatening injuries reported.
The front of one train was smashed, while the other train did not appear to suffer major damage.