In a sign that he remains popular in the city despite the controversies that have marked his four-year term, Mayor William Lantigua emerged the top vote-getter by a wide margin in last Tuesday’s preliminary election. Lantigua, the state’s first elected Latino mayor, collected 5,725 votes to 2,799 for City Councilor at Large Daniel Rivera, the runner-up in the six-way field. The two will now meet in the Nov. 5 city election. The losing contenders were state Representative Marcos A. Devers, with 1,907 votes; Juan Manny Gonzalez, a Lawrence firefighter and first-time candidate, with 1,058; James Patrick O’Donoghue, a first-time candidate, with 305 votes; and Nestor DeJesus with 165. The preliminary drew 12,011, or 32.6 percent, of the city’s 36,844 registered voters. Rivera, a second-term councilor, is vice president of the council and chairman of its Budget and Finance Committee.