BOSTON — Jay Gonzalez has won the Democratic nomination for governor in Massachusetts.

Gonzalez served as secretary of Administration and Finance under former Democratic Gov. Deval Patrick. He defeated longtime political activist Robert Massie in Tuesday's primary.

Both candidates stressed a progressive agenda that included universal health care coverage, stronger protection for immigrants and increased investment for transportation and education.

Gonzalez says incumbent Republican Gov. Charlie Baker has failed to achieve tangible progress in improving the performance of the Boston-area's aging transit system or in narrowing the state's educational achievement gap.

The 47-year-old Ohio native has lived in Massachusetts since 1998.