Democratic presidential hoeful Sen. Barack Obama marked the fifth anniversary of the Iraq War by pledging Wednesday to end the conflict if elected.