It only took five minutes for Herediano to open the scoring through Dave Myrie before Minor Diaz doubled the lead in the 20th minute.
UCR did a pull a goal back through Jameson Scott on 65 minutes but Anllel Porras restored Herediano's two-goal advantage two minutes later.
An 85th-minute penalty to Victor Nunez rounded off a comfortable victory that lifted Herediano one point clear at the top of the division on 42 points.
Second-placed Alajuelense (41 points) knocked Deportivo Saprissa (40) out of top spot with a comfortable 3-0 home win.
A first-half goal to Porfiro Lopez got Alajuelense going before the scoreline was added to in the second-half by Jerry Palacios and Johan Venegas.
Bottom-placed Belen Siglo XXI threw away a two-goal lead to draw 2-2 with Cartagines.
Siglo led 2-0 at the 77th minute mark after Heiner Mora's brace but were stunned by two goals in four minutes to Cartagines.
In other matches, Puntarenas drew 1-1 with Carmelita, Santos de Guapiles overcame Perez Zeledon 2-1 and Uruguay fought out a 1-1 draw with Limon.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.