The victory could give Democrats much-needed momentum going into the 2018 midterm elections.