Democrats are clinging to small leads in both states, and it may take quite a while until the winners are known.