The 31 year-old, who had previously built up a big points lead by dropping the Mexican in rounds one and five, looked to be slowing in the ninth as Marquez took charge and seemed to be giving ground late on.
After a barrage from Marquez early in the tenth, Viloria produced a vicious left hand to drop the WBA champion heavily and there was no way back for the Sonora fighter, who was dropped again seconds later.
Knowledgeable trainer Robert Garcia then made the decision to save his fighter for another day and waved the towel to end the fight as Marquez was clearly still out of it and taking some more heavy punches.
Viloria becomes a unified world champion for the first time in his career, improving his record to 32-3 in the process and will be in line for some huge bouts in 2013, along with a boost up the P4P rankings.
On the undercard in California, undefeated WBA light-flyweight title holder Roman Gonzalez successfully defended his title against Juan Estrada to move to 34-0 with a unanimous point’s victory (118-110, 116-112 twice).
And Filipino super-bantamweight Drian Francisco, who was recently linked to a bout with Guillermo Rigondeaux, moved to 24-1-1 with his 19th stoppage by ending his fight with Javier Gallo in five rounds.