Joseph Kennedy III, the first of his famous political family's generation to seek elective office, has defeated two little-known Democrats in his congressional primary in Massachusetts.

The 31-year-old Kennedy will face the winner of Thursday's GOP primary in the November election for the seat held by longtime liberal Democratic Rep. Barney Frank. He's retiring.

Kennedy is the son of Joseph P. Kennedy II, who represented the state's 8th Congressional District for six terms from 1987-1999, and the grandson of the late Robert F. Kennedy.

Thursday's victor is a graduate of Stanford University and Harvard Law School. He served in the Peace Corps, worked as a prosecutor in Massachusetts and in 2006 co-managed with his twin brother, Matt, the final campaign of their great-uncle, Sen. Edward Kennedy, who died of cancer in 2009.