Rep. Joe Kennedy III, left, elbow-bumps Sen. Edward Markey after their debate for the Democratic primary for senator from Massachusetts, Monday, June 1, 2020, in Springfield, Mass. (Matthew J. Lee/The Boston Globe via AP, Pool)

BOSTON (AP) — Massachusetts U.S. Sen. Edward Markey and his Democratic primary challenger, U.S. Rep. Joe Kennedy III, are planning to go head to head in another televised debate Tuesday.

The debate is scheduled for 7 p.m. on WBZ-TV.

The race is one of the most closely watched political contests in the state this year, pitting a long-term member of Congress from Massachusetts against an heir to the state’s most storied political family.

The race has also been dramatically altered by the pandemic, which for many months forced both candidates to campaign largely virtually as Massachusetts worked to suppress the coronavirus with stay-at-home recommendations.

Since then both Markey and Kennedy have taken steps toward more conventional campaigning, albeit with masks and social distancing.

The political jabs at each other have also sharpened as the race hurtles into its final weeks before the Sept. 1 primary — an earlier primary day than in past years.

A pro-Kennedy group has produced an ad criticizing Markey for missing key votes during the pandemic while Markey has called Kennedy “a progressive in name only.”

Another variable to the race is the opportunity for early and mail-in voting, meaning many voters could cast their ballots before primary day.

In-person early voting for the primary will be held August 22-28. Mail-in voting can happen as soon as individuals apply for and receive their ballots in the mail.

Markey, 74, has served in Congress for decades — first in the House and later in the Senate. The 39-year-old Kennedy currently represents the state’s 4th Congressional District.

Kennedy is the grandson of Robert F. Kennedy, who was attorney general in his brother John F. Kennedy’s White House before being elected to the U.S. Senate representing New York. His father represented Massachusetts in the U.S. House.

Both candidates have raised millions in donations from supporters.

As of the end of June, Markey reported just over $4.8 million in cash left in his campaign account after having raised more than $1.9 million from April through June.

Kennedy also announced he had raised over $1.9 million in the second quarter of the year, also leaving him with nearly $4.8 million in cash in his account.

Kevin O’Connor, an attorney, and Shiva Ayyadurai, who ran as an independent in the 2018 Senate race, are vying for the Republican nomination.