BOSTON (AP) — With their formal session wrapped up for the year, Beacon Hill lawmakers can spend more time in their districts talking to constituents and preparing for the fall elections — starting with the September primary.

For many, that means not breaking a sweat.

Of the 40 Senate seats, there are just seven contested Democratic primaries and no contested primary races on the Republican side. In two dozen races, there are no Republican candidates running, leaving the Democratic candidates a free shot in November. Democrats have also failed to nominate candidates in two Senate races.

The House isn't much better. Of the 160 House seats, there are just 35 contested Democratic primaries and six contested Republican primaries. Republicans, outnumbered in both chambers, aren't fielding candidates in more than 100 House races. Democrats have no candidates in more than a dozen races.

That doesn't mean voters should skip the Sept. 4 primary. There are several key primary contests to be decided:

U.S. SENATOR

Three Republicans are vying for the chance to take on incumbent Democratic Sen. Elizabeth Warren in November.

Geoff Diehl, a state representative who co-chaired Trump's 2016 Massachusetts campaign; Jon Kingston, a business executive; and Beth Lindstrom, a cabinet official under former Republican Gov. Mitt Romney have all faulted Warren for veering too far left.

They criticize Warren for spending more time jetting around the country supporting Democratic candidates and laying the foundation for a possible 2020 run for president than she is speaking out for the interests of Massachusetts residents. Warren has said she isn't running for president.

The three have also offered varying degrees of support for Trump, who won only 32 percent of the Massachusetts vote in 2016.

GOVERNOR

There are two contested primaries for governor.

On the Republican side, incumbent Charlie Baker is facing off against Scott Lively, a staunchly conservative Springfield pastor. Baker recently released his first television ad — a 30-second spot that features the incumbent saying Massachusetts had the highest graduation rate last year and is creating "more jobs than ever."

On the Democratic side Jay Gonzalez, secretary of administration and finance under former Gov. Deval Patrick, and Robert Massie, businessman and environmental activist, are vying for the chance to challenge Baker in November.

Baker has an enormous fundraising edge, with more than $8.4 million in his campaign account as of the beginning of August, compared with $13,000 for Lively, $432,000 for Gonzalez and $109,000 for Massie.

SECRETARY OF STATE

Massachusetts Secretary of State William Galvin is facing a Democratic primary challenge from Boston City Councilor Josh Zakim.

The two jabbed at each other repeatedly Tuesday during a debate on WGBH.

Zakim said Galvin was slow to embrace same-day voter registration and faulted him for accepting donations from people with business before his office Galvin, first elected to the office in 1994, pointed to his oversight early voting in the 2016 election for the first time in Massachusetts.

Whoever wins will face Republican Anthony Amore in the November election.

7th CONGRESSIONAL DISTRICT

Boston City Councilor Ayanna Pressley is mounting an uphill fight to unseat longtime incumbent U.S. Rep. Michael Capuano in the Democratic primary for the state's 7th Congressional District.

The race is garnering attention after Alexandria Ocasio-Cortez — whom Pressley counts as a friend — shocked the New York Democratic establishment with her June 26 primary victory over 10-term U.S. Rep. Joe Crowley.

The race is also being closely watched in part because the district is the state's first majority-minority district. Pressley is African-American. Capuano is white.

OTHER CONGRESSIONAL PRIMARIES

The most crowded congressional contest is in the 3rd Congressional District where incumbent Democratic Rep. Niki Tsongas isn't seeking re-election. The open seat has drawn wide interest, with 10 Democratic candidates vying for their party's nomination. A single Republican is in the race.

In the 1st Congressional District, attorney Tahirah Amatul-Wadud is challenging long-time incumbent Rep. Richard Neal.

In the state's 8th Congressional District, software engineer and video game developer Brianna Wu is hoping to oust another long-time incumbent Rep. Stephen Lynch, in the Democratic primary. The primary also includes Democrat Christopher Voehl.

In the state's 4th Congressional District Gary Rucinski is challenging Democratic Rep. Joseph Kennedy and in the 9th Congressional District, Democratic incumbent Rep. Bill Keating is fielding a challenge from William Cimbrelo.

OTHER PRIMARIES

Two Republicans — James McMahon and Daniel Shores — are vying for the chance to challenge Democratic incumbent Attorney General Maura Healey in November.

Two Democrats — Quentin Palfrey and Jimmy Tingle — are running against each other for the chance to join the Democratic gubernatorial ticket in November as the party's choice for lieutenant governor.

There are two contested Republican congressional primaries. In the 2nd Congressional District, Republicans Tracey Lovvorn and Kevin Powers are facing off for the chance to challenge incumbent Democratic Rep. James McGovern in November.

And in the 5th Congressional District, Republicans John Hugo and Louis Kuchnir are battling to take on Democratic incumbent Rep. Katherine Clark in the general election.