WASHINGTON — Representative Joseph P. Kennedy III of Massachusetts plans to announce on Saturday that he is challenging Senator Ed Markey for the Democratic Senate nomination in their state, setting up a titanic generational clash next year between an heir to the state’s foremost political dynasty and the longest-serving member of its congressional delegation.

Mr. Kennedy informed Mr. Markey of his plans today, according to a Democrat familiar with their discussion who spoke on the condition of anonymity to relate a private conversation. Mr. Kennedy, the grandson of Robert F. Kennedy, will announce his candidacy in a modest, East Boston neighborhood before embarking on a statewide tour.

The contest will almost certainly be the country’s most high-profile Senate primary and could offer clues for just how eager Trump-era Democrats are to replace more incumbent lawmakers. But unlike with some of the Tea Party-era Republican races between ideological foes, Mr. Kennedy, 38, and Mr. Markey, 73, are both reliable progressives and each is claiming support from liberal leaders and organizations.

Initial polling indicates that Mr. Kennedy would begin the contest as the front-runner. And some Massachusetts Democrats — uneasy about the prospect of a fractious, yearlong primary contest — had hoped that Mr. Markey would take a hint and bow out after word of Mr. Kennedy’s interest in the seat first leaked last month.