BOSTON (AP) — U.S. Rep. Joe Kennedy III is edging out U.S. Sen. Ed Markey in the race to stockpile campaign funds ahead of the Sept. 1 Democratic primary election for a Massachusetts Senate seat.

As of the end of March, Kennedy reported more than $6.2 million in cash on hand in his campaign account, compared with $4.4 million for Markey.

The coronavirus pandemic has radically altered how the candidates have campaigned, with Kennedy and Markey relying on virtual town halls and online appeals.

The race pits two well-known Democratic politicians against each other, with Kennedy hoping to unseat the longtime incumbent.

Markey, 73, has served in Congress for decades, first in the House and later in the Senate. The 39-year-old Kennedy, who represents the 4th Congressional District stretching southward from the Boston area, is a member of the nation’s most storied political family.

Kennedy is the grandson of Robert F. Kennedy, who was attorney general in his brother John F. Kennedy’s White House before being elected senator.