What looked likely to be a Democratic shoo-in to replace late party icon Edward Kennedy has instead turned into a too-close-to-call race with a last-minute rally by a Republican , State Senator Scott Brown , a relative unknown just weeks ago .