State and county primary ballots are set for the upcoming midterm elections, with a few contested races that will be closely watched on Martha’s Vineyard including a race for the successor to Dukes County clerk of courts Joe Sollitto. Mr. Sollitto retires in January after 42 years on the job.

The Massachusetts state primary is set for Tuesday, Sept. 4, the day after Labor Day. The general election is Nov. 6.

Two Island attorneys are competing in the Democratic primary for the clerk of courts nomination: Charles Morano of Edgartown and T. George Davis of Oak Bluffs. There are no candidates on the Republican primary ballot.

A third potential candidate for clerk of courts, Anthony Piland of Tisbury, has said he will run as an unenrolled candidate. Non-party candidates can appear directly on the Nov. 6 state ballot by filing the required number of signatures on nomination papers by August 28.

In another county contest there is a race this year for Dukes County register of probate. Acting register of probate Daphne DeVries of Edgartown faces a Democratic primary challenge from Oak Bluffs selectman Gail Barmakian for the seat.

Paulo DeOliveira is running unopposed for a second term as Dukes County Register of Deeds.

Four candidates, all incumbents and all Democrats, will be listed on the primary ballot for the seven seats up for grabs on the Dukes County Commission.

The candidates are John Alley of West Tisbury, Leon Brathwaite of West Tisbury, Christine Todd of Oak Bluffs and Gretchen Tucker Underwood of Oak Bluffs.

Incumbent commissioners Tristan Israel of Tisbury, and Bob Zeltzer of Chilmark have announced they will run for reelection as non-party candidates.

On the state level, Democratic state Sen. Julian Cyr is seeking a second term and faces a challenge in the general election from Barnstable town councilor John Flores, a Republican.

Democratic state Rep. Dylan Fernandes is running unopposed for a second term.

Republican Cape and Islands District Attorney Michael O’Keefe is also seeking reelection to a fifth term unopposed.