Which factor helped Abraham Lincoln win reelection in 1864?

the unpopular Democratic candidate

growing international support

the strong support of the Republican party

the Union's military success

the Union's military success