WASHINGTON — President Obama came into office seven years ago pledging to end the wars of his predecessor, George W. Bush. On May 6, with eight months left before he vacates the White House, Mr. Obama passed a somber, little-noticed milestone: He has now been at war longer than Mr. Bush, or any other American president.

If the United States remains in combat in Afghanistan, Iraq and Syria until the end of Mr. Obama’s term — a near-certainty given the president’s recent announcement that he will send 250 additional Special Operations forces to Syria — he will leave behind an improbable legacy as the only president in American history to serve two complete terms with the nation at war.

Mr. Obama, who won the Nobel Peace Prize in 2009 and spent his years in the White House trying to fulfill the promises he made as an antiwar candidate, would have a longer tour of duty as a wartime president than Franklin D. Roosevelt, Lyndon B. Johnson, Richard M. Nixon or his hero Abraham Lincoln.

Granted, Mr. Obama is leaving far fewer soldiers in harm’s way — at least 4,087 in Iraq and 9,800 in Afghanistan — than the 200,000 troops he inherited from Mr. Bush in the two countries. But Mr. Obama has also approved strikes against terrorist groups in Libya, Pakistan, Somalia and Yemen, for a total of seven countries where his administration has taken military action.