NEW ORLEANS — With a victory that defied political geography and near universal predictions from just months earlier, a previously little-known Democrat, State Representative John Bel Edwards, soundly defeated United States Senator David Vitter in a runoff election on Saturday to become the next governor of Louisiana.

Mr. Edwards won 56 percent of the vote with virtually all of the ballots counted.

A more promising red state Democrat could hardly have been found than Mr. Edwards, a Catholic social conservative from a family of rural law enforcement officers who graduated from West Point and served eight years of active duty in the Army.

Mr. Vitter, for his part, was a problematic candidate for Republicans, even though he had been widely seen as the favorite for months. A prostitution scandal from 2007, the baggage of an unpopular Republican incumbent, Gov. Bobby Jindal, and a series of state political foes with long memories dragged Mr. Vitter down before an Oct. 24 primary. He never recovered.

Not only did he lose this race but Mr. Vitter told supporters Saturday night that he would not run for re-election to the Senate in 2016. Republican strategists in Washington had expressed reluctance to put money behind him, preferring a candidate who would be an easier sell in a tricky election year for Senate Republicans. A line of Republicans interested in the seat has already formed.