In consolidated summary proceedings under section 330 of the Election Law with respect to the general election held on November 2, 1971 for the public office of County Legislator in the 15th Legislative District, Suffolk County, (1) petitioners Feldman and Corrigan cross-appeal from so much of a judgment of the Supreme Court, Suffolk County, entered December 27, 1971 after a hearing, as adjudged that, after a recanvass of the votes by the court, the votes for Feldman exceeded those for Corrigan by 15 and that 33 illegal votes were cast; (2) Feldman further appeals from the portion of the judgment which, because of said 33 illegal votes and other irregularities, denied his petition for a direction that he be certified the winner; and (3) Corrigan further appeals from the portion of the judgment which denied his request for a new election. Judgment modified, on the law and facts, by striking therefrom the first two decretal paragraphs and by substituting therefor a provision granting candidate Feldman’s petition in full and directing the Board of Elections of Suffolk County (1) to recanvass the votes so as to show a total of 4,391 votes for Martin J. Feldman, comprised of 4,320 on the machines and 71 on paper ballots, and a total of 4,372 votes for James J. Corrigan, Jr., comprised of 4,323 on the machines and 49 on the paper ballots, and (2) to certify Martin J. Feldman as the candidate elected to the position of County Legislator in the 15th Legislative District of Suffolk County. As so modified, judgment affirmed insofar as appealed from, without costs. The original canvass by the inspectors of election showed 4,394 votes for Feldman (4,320 on machines and 74 on paper ballots) and 4,378 for Corrigan (4,323 on machines and 55 on paper ballots); *826Feldman’s margin thus was 16 votes. A recanvass by the Reeanvassing Board showed the same totals for the machine votes, but 2 less for Feldman on the paper ballots, thus reducing his margin to 14 votes; the Republican members of the Reeanvassing Board reported that they could not declare a winner because there were 32 more votes on one machine than the number of signed registration cards in that election district; and the Democratic members of the Reeanvassing Board reported that the discrepancy in that district between machine votes and signed registration cards was only 3 a number too small to influence the outcome of the election. Thereafter, Feldman and Corrigan instituted these summary proceedings; Feldman sought an order directing the Reeanvassing Board to certify him as the winner; and Corrigan sought a court reeanvass and an order for a new election. At the outset, Feldman contended (a) that the court lacked power, in these summary proceedings, to inquire into the legality of votes cast on the voting machines or annul the election because of any such illegal votes or other irregularities and (b)' that the court’s only jurisdiction in these proceedings was to review the validity of the paper ballots, to review the mathematical accuracy of the tabulation of votes cast on the machines, as shown on the machine counters, to direct the Reeanvassing Board to recanvass the votes in accordance with the court’s findings and then to declare which candidate had the most votes. Special Term overruled Feldman’s contentions and held extensive hearings at which it not only reviewed the validity of the paper ballots but also inquired into the eligibility of voters who had voted on machines and into alleged irregularities in the conduct of the voting and post-election proceedings relating to the canvass and security of the ballots. At the conclusion of the hearings, Special Term found that 33 ineligible voters had east votes on the machines; that certain paper ballots were invalid; that there had been various irregularities in the conduct of the voting and the post-election proceedings; and that a tabulation of the votes cast on machines, including the allegedly invalid ones, plus the valid paper ballots, gave Feldman 4,389 votes (4,320 on machines and 69 on paper ballots) and Corrigan 4,374 votes (4,323 on machines and 51 on paper ballots) — a margin of 15 votes in Feldman’s favor. However, because of the 33 invalid votes on machines and the other irregularities, Special Term concluded that the Reeanvassing Board was justified in its refusal to declare a winner; and it denied Feldman’s petition and, on the ground of lack of power, denied Corrigan’s request to order a new election. We agree with so much of Special Term’s determination as held that it lacked power to order a new election; but in all other respects we find it erroneous. In a summary proceeding pursuant to section 330 of the Election Law, the court’s jurisdiction is limited to that conferred by the statute (Matter of Mansfield v. Epstein, 5 N Y 2d 70, 74; Matter of Hogan v. Supreme Ct., 281 N. Y. 572, 576; Matter of Holley [Rittenberg], 268 N. Y. 484, 487; Matter of Mullen v. Heffernan, 193 Misc. 334, affd. 274 App. Div. 972, affd. 298 N. Y. 785; Matter of Southard v. McGann, 279 App. Div. 588; Matter of Reich v. Bosco, 21 Misc 2d 973, affd. 9 A D 2d 919). While section 330 gives the court summary power to set aside a primary election and order a new one (subd. 2), it does not give the court summary power to do either of those things with respect to a general election; where a general election is involved, the court can make such determinations only in a plenary action in the nature of quo warranto, if the office is occupied, or in a plenary action for a declaratory judgment, if the office is not yet occupied (Election Law, § 330, subds. 4, 5; Matter of Mullen v. Heffernan, supra; Matter of Southard v. McGann, supra; Matter of Reich *827v. Bosco, supra; Matter of Hogan v. Supreme Ct., supra; Matter of Macy v. Clayton, 277 App. Div. 1131, mot. for Iv. to app. den. 302 N. Y. 950; Matter of Carson, 164 Misc. 945, affd. 254 App. Div. 801; Matter of Quinn v. Kehoe, 61 Misc 2d 392; Matter of Kranis v. Monserrat, 63 Misc 2d 119; Matter of Hanley v. Creaser, 31 Misc 2d 1069; Matter of Lester v. Gruner, 205 Misc. 67). In a summary proceeding under section 330 of the Election Law which involves a general election, the court’s only powers are (1) to determine the validity of protested, blank: or void paper ballots and protested or rejected absentee ballots and to direct a recanvass or correction of any error in the canvass of such ballots (subd. 4) and (2) to review the canvass and direct a recanvass or correction of an error or performance of any required duty by the board of canvassers (subd. 5). In such proceeding, the court lacks power to go behind the returns and determine whether voters were lawfully registered and eligible to vote; it cannot take the testimony of machine voters to see for whom they voted; it cannot annul an election or direct a new one because a machine registered more or less votes than were actually cast, or more votes than the number of eligible voters; it cannot annul an election for irregularities in the voting or in the post-election handling of the ballots; with respect to the canvass of votes, it cannot go behind the figures shown on the machines and can only correct mathematical errors in the canvassers’ tabulation of the machine vote, as shown on the machine counters, correct errors in their rulings on the validity of paper ballots and then direct the canvassers to tabulate the votes, as found by the court, and certify the winner of the election (Matter of Hogan v. Supreme Ct., supra; Matter of Mullen v. Heffernan, supra; Matter of Reich v. Bosco, supra; Matter of Southard v. McGann, supra; Matter of Carson, supra; Matter of Macy v. Clayton, supra; Matter of Quinn v. Kehoe, supra; Matter of Hanley v. Creaser, supra; Matter of Lester v. Gruner, supra; Matter of Ingamells v. Board of Elections of Oswego County, 259 App. Div. 36; Matter of Van Etten v. Millspaugh, 52 Misc 2d 569; Matter of Ryan v. Kalin, 48 Misc 2d 27; Matter of Periconi v. Power, 48 Misc 2d 391). In short, the Board of Elections has the ministerial duty to count the votes and determine who has the most; and the court’s sole jurisdiction in a summary proceeding under section 330 (involving a general election) is to correct errors of the board in passing upon disputed paper ballots or in making the mathematical tabulation of the votes, and then to compel the board to perform its duty of counting the votes, as corrected by the court, and certifying the winner. In light of the foregoing, Special Term exceeded its powers when it inquired into the eligibility of various voters who had cast votes on machines, when it inquired into irregularities in the voting and post-election procedures and when it sustained the Recanvassing Board’s refusal to certify the winner (thus in effect nullifying the election) because of those irregularities and the number of votes cast on the machines by allegedly ineligible voters. As Special Term’s tabulation of the machine votes, plus the valid paper ballots, showed Feldman the -winner by 15 votes, he was entitled to a judgment directing the Recanvassing Board to recanvass the vote, as found by the court, and to certify him as the winner; and Special Term erred by not granting him that relief. Apart from the foregoing, this would not be a ease in which the election should be annulled for irregularities even if the court had that power. Special Term found that 33 illegal votes had been cast on the machines and that the count of machine and paper ballots showed Feldman -with a margin of 15 over Corrigan. Our review of the testimony and exhibits indicates that the number of illegal machine votes was only *82825; that Special Term erroneously voided two Feldman ballots and erroneously sustained two Corrigan ballots; and that Feldman’s actual margin consequently was 19, instead of 15. Hence, for Corrigan to overcome Feldman’s lead and defeat him, he would have to show that 23 of the 25 unidentified, illegal machine votes had been east for Feldman. In this extremely close election, it is at most only a remote possibility that this had occurred; it clearly is not a probability and in fact “ the probabilities all combine to repel any such conclusion ” (Matter of Badillo v. Santangelo, 15 A D 2d 341, 342). As it is not probable that elimination of the invalid machine votes would change the result of this election, there would be no justification for annulment of the election, even if we were to assume arguendo that the court had that power (Matter of Stevenson v. Power, 27 N Y 2d 152; Matter of Ippolito v. Power, 22 N Y 2d 594; Matter of Badillo v. Santangelo, supra). Shapiro, Acting P. J., Gulotta, Christ and Brennan, JJ., concur.