WASHINGTON — The special election for a Senate seat in Alabama is, at first glance, a complex affair, with 10 Republican candidates in the party’s primary, at least three of whom could plausibly win, and a possible runoff this fall if nobody can garner a majority when ballots are cast Aug. 15.

But under closer examination, the contest may boil down to a single question: How will President Trump respond to the candidate who denounced him for “serial adultery”?

The campaign for the Senate seat once held by Attorney General Jeff Sessions is ostensibly playing out between Muscle Shoals and Mobile Bay. But the battle is being waged just as fiercely inside the White House, where Mr. Trump’s endorsement could determine who will serve as the state’s junior senator for the next three years.

The Republican race has pitted the current, appointed senator, Luther Strange, against Representative Mo Brooks, a conservative firebrand whose brash, anti-immigrant, pro-gun politics are distinctly Trumpian — save that “serial adultery” jab.