Updated

Tuesday’s primary delivered another political upset, setting the stage for the first black woman to represent Massachusetts in Congress.

Massachusetts

Gubernatorial primary results:

Republican Gov. Charlie Baker earned his party’s nomination in Tuesday’s primary, defeating Scott Lively, a conservative minister and strong supporter of President Donald Trump as he seeks his second term.

Baker

AP (FILE - Republican Gov. Charlie Baker will square off with Democratic candidate Jay Gonzalez in November as he hopes to win re-election for a second term.)

On the Democratic side, Jay Gonzalez won his party’s primary, edging out Robert Massie – a longtime political and environmental activist, who struggled to raise cash for his campaign.

Both Baker and Gonzalez share a similar background, working as state secretary of administration and finance under their party’s respective governor, while also leading a health insurance company after leaving politics. They will square off in November.

GOP Primary – Charlie Baker (Incumbent)            Votes: 154,874       Vote Percentage: 64.1%

Dem Primary – Jay Gonzalez       Votes: 315,665       Vote Percentage: 64.8%

U.S. Senate primary results:

Democratic U.S. Sen. Elizabeth Warren had no challenger in Tuesday’s primary, and will face Republican state Rep. Geoff Diehl who defeated two other GOP opponents for the chance to unseat Warren in November.

The GOP will have a tough time defeating Warren, who is also widely considered as a contender in the 2020 presidential race, as Massachusetts is strongly opposed to Trump and the Republicans make up less than 11 percent of the electorate.

Warren file

AP (FILE - It will be a tough battle in November for Republican's to try and unseat Democratic U.S. Sen. Elizabeth Warren, who had no challenger in Tuesday's primary.)

Warren has previously said she is not running for president.

GOP Primary – Geoff Diehl              Votes: 126,364                    Vote Percentage: 54.8%

Dem Primary – Elizabeth Warren  UNCONTESTED

U.S. House of Representatives

Ayanna Pressley, a progressive candidate who was backed by Democratic socialist Alexandria Ocasio-Cortez, delivered another political stunner on Tuesday – defeating 10-term incumbent Rep. Michael Capuano in the state’s 7th Congressional District.

Pressley’s victory comes on the heels of Ocasio-Cortez’s upset over longtime Rep. Joe Crowley, D-N.Y in a primary earlier this year, and is yet another indication of the changing of the guard within the Democratic Party as it seeks a more younger and diverse base.

There is no Republican challenger on the November ballot, essentially guaranteeing the 44-year-old to become Massachusetts’ first black woman to serve in Congress.

Presslety

Boston City Councilor Ayanna Pressley, who has the backing of Alexandria Ocasio-Cortez, defeated longtime Rep. Michael Capuano in Tuesday's primary. (AP)

Here are the unofficial results for all 9 Congressional Districts that held primaries on Tuesday:

District 1: Dem Primary – Richard E. Neal (Incumbent)      UNCONTESTED

GOP Primary -   NO CANDIDATE

District 2: Dem Primary – Jim McGovern                  UNCONTESTED

      GOP Primary – Tracy Lovvorn      Votes: 14,544      Vote Percentage: 61.0%

District 3: Dem Primary – Daniel Koh                     Votes: 17,199        Vote Percentage: 21.7%

    Lori Trahan                   Votes: 16,555        Vote Percentage: 20.9%

GOP Primary – Rick Green   UNCONTESTED

District 4: Dem Primary – Joseph P. Kennedy III (Incumbent)  Votes: 51,319            Vote Percentage: 93.4%

GOP Primary – NO CANDIDATE

District 5: Dem Primary – Katherine Clark (Incumbent)   UNCONTESTED

GOP Primary – John Hugo               Votes: 11,123            Vote Percentage: 64.2%

District 6: Dem Primary – Seth Moulton (Incumbent)   UNCONTESTED

        GOP Primary – Joseph Schneider UNCONTESTED

District 7: Dem Primary – Ayanna Pressley    Votes: 55,743       Vote Percentage: 58.9%

Michael Capuano (Incumbent)    Votes: 38,925        Vote Percentage: 41.1%

GOP Primary – NO CANDIDATE

District 8: Dem Primary – Stephen Lynch (Incumbent)     Votes: 50,824     Vote Percentage: 70.9%

GOP Primary – NO CANDIDATE

District 9: Dem Primary – Bill Keating (Incumbent)         Votes: 42,408         Vote Percentage: 85.1%

GOP Primary – Peter Tedeschi   UNCONTESTED

The Associated Press contributed to this report.