Lt. Gov. Mario Cuomo swept to a stunning upset victory over Mayor Edward Koch tonight in the New York Democratic gubernatorial primary.

With 95 percent of the state's precincts reporting, Cuomo led Koch by 53 percent to 46 percent. He showed surprising strength in New York City and its suburbs, where Koch was expected to win his victory margin.

Cuomo amassed huge 2 to 1 ratios in upstate New York, as expected, but he also surprised even his own strategists by holding Koch to less than 52 percent of the vote in New York City.

With 94 percent of the vote in his race counted, millionaire businessman Lewis Lehrman, as expected, was declared a winner over former U.S. attorney Paul Curran in the Republican gubernatorial primary.

Lehrman, who spent a record $7.2 million, primarily to build name recognition for the general election, had 81 percent of the vote to Curran's 19 percent.

Sen. Daniel Patrick Moynihan, seeking a second term, won an easy victory in his Democratic primary race against Melvin Klenetsky, a protege of Lyndon LaRouche, former head of the U.S. Labor Party.

With 95 percent of the precincts reporting, Moynihan had 84 percent of the vote and Klenetsky had 16 percent.

In the Republican senatorial primary, Assembly member Florence Sullivan won an upset victory with 41 percent of the vote, to 30 percent for former state banking superintendent Muriel Siebert and 29 percent for former U.S. attorney Whitney North Seymour.

There also were 13 Democratic and three Republican primaries in the state's 34 congressional districts. One, in Syracuse, pitted two Republican House incumbents, Gary A. Lee and George C. Wortley, against each other because of redistricting, which cost New York five House seats and threw them into the same district against each other.

New Yorkers can look forward to a traditional liberal versus conservative battle for the governorship this fall. Cuomo also will be on the Liberal Party line; Lehrman, a millionaire businessman and ardent supporter of President Reagan, is the candidate of the Conservative and Independent parties as well as the Republicans.

Koch, who entered the race cocky and confident, made his concession speech at 11:30 p.m. Pale but composed, he entered the ballroom of the Sheraton Hotel to the strains of "New York, New York" and began his talk with characteristic style -- a sad, but snappy, reply to a joke.

"Four more years Ed," somebody in the crowd yelled.

"Definitely not," the mayor said.

Then in a brief speech, in which he stressed party unity, he conceded.

"First of all, don't shed a tear," he said. "You've worked as hard as you could and I worked as hard as I could and we did the best we could to win. It's better to win than to lose, but if the people decide otherwise, that's the nature of the democratic system, so I have no regrets. I'm still the mayor and that's not bad. In fact, it's good. I love the city of New York and all the people in it and tomorrow I'll be back at City Hall, working as hard as I can, the way I always have been."

Cuomo's polling analyst and strategy adviser Patrick Caddell said tonight that the reason Cuomo showed such strength in the city was that he drew a sharp liberal-conservative distinction between himself and the mayor in the closing days of the campaign.

The mayor's area of greatest strength was, as expected, the city's suburban counties -- Long Island's Nassau and Suffolk counties and Westchester and Rockland counties to the north -- where his margins were between 7 and 10 percent.

Cuomo registered huge leads of as much as 36 percent in the large upstate cities, and 43 percent in the rural upstate counties, figures by WCBS-TV showed.

Koch and Cuomo wound up their race each in his own way -- the flamboyant Koch taking to the city streets to press the flesh in a last-minute bid for votes and Cuomo, according to his people, at home "writing his victory speech."

Caddell, who was President Carter's pollster, said that Cuomo had scored significant late gains among Catholics, young Jewish voters, and women.

His poll also showed that a significant portion of New York City residents who said they had voted for Cuomo did so because they believed Koch was a good mayor and should remain.

Koch had problems in upstate from the moment he announced. In part this was due to the traditional doubts of upstaters that any New York City mayor can deal fairly with the entire state. In part it was due to a Playboy magazine interview at the outset of the campaign in which he spoke of upstate life in the flippant way that has become his trademark.

Rural life is "a joke", he told Playboy, and suburban life is "sterile . . . it's wasting your life." Albany, he went on, is "small-town life at its worst."