NEW YORK – The runner-up in New York City’s Democratic mayoral primary ended his campaign Monday, clearing the way for a general election that will pit the two major-party opponents with vastly different visions of how the city should move forward after 12 years of Michael Bloomberg as mayor.

Democratic front-runner Bill de Blasio will face Republican nominee Joe Lhota now that the second-place finisher in the Democratic primary, Bill Thompson, has withdrawn. Thompson’s decision eliminated a potential Oct. 1 runoff against de Blasio. That possibility had loomed as a significant distraction for Democrats, who are desperate to elect their first mayor since 1989.

“Bill de Blasio and I want to move the city forward,” Thompson said at City Hall news conference Monday morning. “This is bigger than any one of us.”

De Blasio has run an unabashedly liberal campaign, calling for a tax hike on the city’s wealthiest neighborhoods to pay for universal pre-kindergarten and reforms to police tactics and demanding greater income equality to “put an end to the tale of two cities.”

He also placed his interracial family at the center of his campaign. An ad narrated by his 15-year-old son helped fuel his rise from fourth to first in the primary’s final month. He also received a boost in the campaign’s final days when, in an interview, Bloomberg labeled de Blasio’s campaign as “racist” and “class warfare,” criticisms that galvanized de Blasio supporters.

Bloomberg, who declined to endorse in the race, refused to answer questions about his comments Monday during his first news conference since the remarks were published.

Lhota, who served as the head the city’s transit agency and was a one-time deputy mayor to Rudy Giuliani, has vowed to continue many of Bloomberg’s policies.