In this case, plaintiffs, unsuccessful candidates for school board positions in five school districts in Fresno County, seek to set aside the election of their opponents on the ground that “illegal votes were cast.” (Elec. Code, § 20021, subd. (d).)1 A large number of illegal votes were cast in the elections for each of the five school districts, and, if all of those votes were cast for the successful candidates, the outcome of each of the elections would be affected. But the evidence plaintiffs introduced in support of their challenge to the election does not show for whom the illegal ballots were cast. The majority nonetheless concludes that the election should be set aside.
I disagree. In my view, the law permits an election to be set aside because of illegal votes only if the person challenging the election can show that a *286large enough number of illegal votes were cast for the winning candidate(s) so that, if the illegal votes for both the winning and the losing candidates were set aside and the remaining votes were tabulated, the outcome of the election would be different. Here, plaintiffs have not made such a showing, and the majority’s conclusion that the election should be invalidated because of illegal votes is therefore erroneous. But, as I shall explain, plaintiffs may be entitled to prevail on the ground that the successful candidates engaged in “offense(s) against the elective franchise.” (§ 20021, subd. (c).) I would direct the Court of Appeal to remand the matter to the trial court with directions to determine whether such a violation occurred.
I
Insofar as I can determine from the skimpy record furnished to this court,2 the relevant facts are these: In November 1991, elections were held in Fresno County for positions on the boards of one high school and four elementary school districts. Either two or three positions were vacant on each of the various boards, so voters were entitled to vote for more than one candidate. The losing candidates (plaintiffs) challenged the results of the election.
Plaintiffs’ challenge was directed primarily to the activities of the Voter Education Project (YEP), an organization created by the Fresno Chapter of the Black American Political Association of California (BAPAC). Although BAPAC did not endorse candidates in the elections, four of the winning candidates were BAPAC members, and the referee found that BAPAC had “assisted” the winning candidates by “providing and distributing materials and access to information concerning voters.”
Before the election, YEP workers visited potential voters in their homes and urged them to sign registration affidavits and to apply for absentee ballots. The YEP workers encouraged these potential voters to agree to have their ballots hand-delivered to them by BAPAC; in most cases, YEP workers filled in BAPAC’s address as the place to which the ballots were to be mailed.
The absentee ballots that were mailed to BAPAC were then brought to voters’ homes by YEP workers, BAPAC members, and candidates in the *287school board elections. The voters were encouraged to vote in the presence of the persons who had delivered the ballots; in some cases, those persons gave information regarding candidates or issues. After voting, the voters placed their ballots in envelopes, signed and dated the envelopes, and gave them to the persons who had hand-delivered the ballots. These persons then took the ballots to BAPAC headquarters, from which they were mailed to the Fresno County Elections Department.
As the majority explains, the manner in which the VEP workers provided the ballots to the voters and the mode of casting the ballots violated the absentee voting requirements of sections 1006 and 1013. Under those statutes, BAPAC’s address should not have been used as the place to which the absentee ballots were sent, and voters who chose to return their absentee ballots by mail should have personally mailed the ballots instead of giving them to the persons who brought the ballots to their homes. (Maj. opn., ante, pp. 279-281.) As a result, the ballots so cast were illegal, and should not have been counted.
BAPAC mailed 1,023 absentee ballots to the county elections department. Of these, 93 ballots were disqualified. The elections department removed the remaining 930 from their envelopes, commingled them with the other ballots cast in the election, and counted them. As a result, 930 illegal ballots were tabulated in the high school district election, and smaller numbers of illegal ballots were tabulated in the elections for the elementary school districts.
II
Before considering whether, and on what basis, plaintiffs’ challenge to the school board elections should be upheld, it is important to distinguish an election challenge brought on the ground of “illegal votes” under section 20021, subdivision (d) (hereafter section 20021(d)), from a challenge under section 20021, subdivision (c) (hereafter section 20021(c)), brought on the ground that the challenged candidate has committed an offense against the elective franchise.3
An “illegal” vote is simply a ballot cast in violation of the procedures established by the Elections Code. A ballot may be illegally cast even *288though the voter, or the persons assisting the voter, did not intend to subvert the elections process. Thus a well-meaning voter may cast an illegal vote through ignorance or inadvertence rather than a conscious attempt to circumvent elections laws or to give any candidate an unfair advantage. Assume, for example, that a major civic organization such as the League of Women Voters, in a well-intended but misguided attempt to increase voter turnout, agreed to mail in the absentee ballots of a number of voters. The ballots mailed in this fashion would be “illegal,” even though neither the League of Women Voters nor the voters themselves intended to undermine the electoral process.
If a trial court finds that the number of illegal votes cast for a winning candidate is so great that, when those votes are subtracted from the candidate’s total, that candidate no longer has a plurality of the votes legally cast, the court must not only set aside the election (§ 20024), but it must also declare as the winner the candidate who received the plurality of the legally cast votes. (§ 20087.) In that situation, the result will be the election of a candidate who did not enjoy the support of a plurality of the people who cast ballots, because some of the persons voting for the candidate who received the most votes did not cast their votes in the statutorily approved manner.
Because a successful election challenge based on illegal votes may thus lead to the election of a candidate receiving a minority of the votes cast (but a plurality of the legally cast ballots), the Legislature has stated that absentee ballot provisions “shall be liberally construed in favor of the absent voter” (§ 1001) and this court has said that “[ejven mandatory provisions [of the election laws] must be liberally construed to avoid thwarting the fair expression of popular will.” (Wilks v. Mouton (1986) 42 Cal.3d 400, 404 [229 Cal.Rptr. 1, 722 P.2d 187].) To prevail, a contestant must show a defect in the election by “clear and convincing evidence.” (Ibid.; see also Smith v. Thomas (1898) 121 Cal. 533, 536 [54 P. 71].)
When, by contrast, a challenge is based on offenses against the elective franchise under section 20021(c), the issue for the trial court is not whether individual votes were improperly cast; rather, the issue is whether the prevailing candidate has committed any one of a number of criminal acts proscribed by the Elections Code.
Here, plaintiffs’ challenge to the election was twofold: illegally cast votes under section 20021(d), and the candidates’ commission of offenses against the elective franchise under section 20021(c). Because the trial court ordered a new election on the ground that illegal votes were cast, it did not resolve plaintiffs’ challenge under section 20021(c). The majority upholds the trial court’s ruling. I do not agree, as I shall explain.
*289III
A challenge to an election based on illegally cast votes must satisfy the evidentiary burden imposed by section 20024. That statute provides: “An election shall not be set aside on account of illegal votes, unless it appears that a number of illegal votes has been given to the person whose right to the office is contested or who has been certified as having tied for first place, which, if taken from him, would reduce the number of his legal votes below the number of votes given to some other person for the same office, after deducting therefrom the illegal votes which may be shown to have been given to that other person.”
In other words, under section 20024 an election challenge on the basis of illegal votes may be sustained only if the challenger shows “not only that illegal votes were sufficient in number to account for the result but also that illegal votes were cast in such a manner as in fact to determine the result.” (Canales v. City of Alviso (1970) 3 Cal.3d 118, 126 [89 Cal.Rptr. 601, 474 P.2d 417], italics added.) The trial court may not simply assume that all illegal votes were cast for the prevailing candidate; rather, the challenging party must present evidence showing how the illegal votes were cast.
In this case, plaintiffs presented virtually no evidence of how the 930 illegal ballots BAP AC submitted to the county elections department were cast. According to the trial court’s findings of fact, two voters testified that the VEP worker who brought them their absentee ballots assisted them in voting; their ballots, however, were among the ninety-three ballots that were disqualified by the county elections department and not counted. One voter testified that the VEP workers told him for whom to vote; his vote was counted by the elections department. Two other persons testified that they had not voted, although the records of the elections department showed that ballots had been submitted on their behalf. The elections department disqualified both of these ballots. The trial court’s findings of fact contain no other evidence of the manner in which individual voters cast their ballots.
Plaintiffs could have called as witnesses each of the persons who had submitted illegal ballots, or, more realistically, a representative sample of those persons, and asked them how they voted.4 Alternatively, plaintiffs could have used other circumstantial evidence to show for whom the individuals cast their illegal votes. (See Canales v. City of Alviso, supra, 3 Cal.3d *290at pp. 127-128.) Because plaintiffs did not do so, they failed to discharge their burden, imposed by section 20024, of showing that the number of illegal votes actually cast for the prevailing candidate was so great that the outcome of the election was altered.
Plaintiffs’ failure to satisfy the statutory burden can be readily shown by an examination of the election in one school district. In the Pacific Union School District, for example, two seats were contested. Elected were Lawrence Cato and Rosemary Garcia, who defeated Roland Lawrence, Delbert Cederquist, Tami Gandy, and Toni Nagai. The totals were: Cato— 358; Garcia—316; Lawrence—189; Cederquist—175; Gandy—80; Nagai— 70. There were 310 illegal ballots. Because Cato’s margin of victory over his nearest unsuccessful challenger (Lawrence) was 169 votes, plaintiffs had to show that 169 more illegal votes were cast for Cato than were cast for Lawrence to overturn Cato’s election under section 20024.
Because voters could vote for more than one candidate, ballots could be cast in four different ways: (1) voters could vote for neither Cato nor Lawrence, (2) they could vote for both of them, (3) they could vote for Cato but not Lawrence, and (4) they could vote for Lawrence but not Cato. Illegal votes in categories (1) and (2) would not affect the outcome of the election, because they would not alter Cato’s margin of victory; illegal votes in category (3) would, if deducted from Cato’s total, reduce his margin of victory, while illegal votes in category (4) would, if deducted from Lawrence’s total, increase Cato’s margin. Because the margin of victory was 169 votes, Cato’s election would be affected only if plaintiffs could show that of the 310 illegally cast ballots, there were 169 more of them in category (3) than there were in category (4).
Plaintiffs offered no evidence showing how many of the illegal votes fell into each of the four categories I just described. Consequently, it is impossible to determine from the evidence presented whether Cato’s election was affected by the illegally cast votes.
The trial court recognized the problem in its findings of fact and conclusions of law: “This court cannot determine with certainty how the illegal ballots were cast. Thus, it cannot deduct the illegal votes directly from a defendant to see if he or she received a majority of the lawful votes for the office. (§§ 20024, 20087.)” The court nevertheless concluded that, because of the “wholesale violation of the mandatory requirements of the absentee voting laws in this case,” there should be a remedy to prevent “a loss of *291public respect for and diminution of the integrity of the absentee ballot process” and to deter “greater abuse of the process in future elections.” Because the trial court was convinced that the illegal votes cast were sufficient to affect the election of “many” of the defendants, it invalidated the election of all of the candidates in each of the five school districts.
Although the trial court’s concern to achieve a “just” result is understandable, it was not entitled to disregard the mandate of section 20024. As discussed earlier, that statute permits the court to set aside an election because of illegal votes only if the plaintiff has shown that enough illegal votes were cast for the winning candidate that, if the illegal votes for both the winning and losing candidates were set aside and the remaining votes were counted, the election’s outcome would be affected. The trial court’s finding that “many” of the elections were affected does not support its conclusion that the election of all the candidates should be set aside. Once the court found that the evidence was insufficient to permit it to subtract the illegal votes from the candidates’ totals, it should have recognized that plaintiffs had not met their burden, imposed by section 20024, of presenting evidence that would enable the trial court to perform this task, and should thus have concluded that plaintiffs had not demonstrated that the illegal votes required the election to be set aside.
Nonetheless, the majority concludes that the trial court’s ruling setting aside the election should be upheld. The majority’s reasons for its conclusion are not convincing, as I shall explain.
Section 20024 states that an election shall not be set aside unless “it appears” that a subtraction of the illegally cast votes from each candidate would alter the outcome of the election; seizing upon the words “it appears,” the majority concludes that the Legislature intended that an election be invalidated whenever “illegal votes cannot be attributed to any one candidate, but nevertheless ‘appear’ sufficient in number or effect to have altered the outcome of the election.” (Maj. opn., ante, p. 283.)
I cannot agree with the majority’s analysis. Section 20024’s use of the word “appear” certainly indicates a legislative conclusion that the trial court need not determine with absolute certainty for whom the illegal votes were cast before it may invalidate the election; nevertheless, the trial court must still decide, based on evidence presented, how the votes were cast. Such evidence was not offered here. The majority accuses the Court of Appeal of reading the words “it appears” out of section 20024; the majority, however, uses those very words to obliterate the remainder of the statute, which requires the trial court to determine how many illegal votes were cast for each candidate, and to subtract those votes from their totals.
*292The majority also attempts to find support for its holding by relying on Canales v. City of Alviso, supra, 3 Cal.3d 118. This reliance is misplaced. In Canales, an election was held to determine whether the City of Alviso should be annexed by the City of San Jose. There were 189 votes cast in favor of consolidation and 180 against. The contestants challenged 21 votes as illegal; with respect to 9 of those votes, the contestants attempted to show how they were cast by producing evidence that the 9 voters had signed a petition to place the measure proposing consolidation on the ballot. Based on that evidence, this court concluded, the trial court should have found that those 9 voters had cast their votes in favor of consolidation.
Under Canales, a challenger claiming that an election was affected by illegal ballots need not rely on the ballots themselves or the voter’s testimony as to how he or she voted in order to demonstrate how an illegal vote was cast. Instead, the challenger may use circumstantial evidence to show how an illegal vote was cast. Canales does not, however, authorize the invalidation of an election when, as here, the challenger has presented virtually no evidence as to how individual ballots were cast.5
Finally, the majority points to “widespread illegal voting practices . . . permeating] this election—including fraud and tampering” and “nearly all of the candidates themselves, knowingly or otherwise, [taking] part in the malconduct . . . .” (Maj. opn., ante, p. 285.) These “illegal voting practices” may well independently require the invalidation of the election in this case. They do not, however, permit us to set aside the election because of illegally cast ballots. To do so requires, under section 20024, evidence showing for whom the illegal ballots were cast, and evidence that a sufficient number of them were cast for the prevailing candidate so that the outcome of the election would be affected. Such evidence was not presented here.6
*293IV
In concluding that the school board elections challenged in this case may not be set aside on the ground of illegally cast votes, I do not necessarily conclude that plaintiffs’ challenge to the election must be rejected. Although the trial court focused on plaintiffs’ challenge to the election under section 20021(d) (the casting of illegal votes), plaintiffs did also challenge the election under section 20021(c), which permits a challenge on the ground that “the defendant has given to any elector or member of a precinct board any bribe ... or has committed any other offense against the elective franchise defined in Division 17 (commencing with section 29100).”
An election challenge based on illegally cast votes may be sustained only if it meets the standard set forth in section 20024. As I have explained, the evidence offered in this case is insufficient, under section 20024, to support the trial court’s order setting aside the election. But a challenge to an election based on section 20021(c) is subject to no such limitation; indeed, the Elections Code contains no limitation whatsoever on a trial court’s power to invalidate an election under section 20021(c). (Stebbins v. White (1987) 190 Cal.App.3d 769, 790 [235 Cal.Rptr. 656].)
In this case, because it concluded that the election of each of the successful school board candidates should be set aside under section 20024, the trial court did not determine whether the candidates had violated section 20021(c). The court did, however, find a “wholesale violation of the mandatory requirements of the absentee voting laws in this case." The majority agrees, concluding that “clear and convincing evidence established pervasive illegalities that permeated the election process” (maj. opn., ante, p. 282), and listing various Elections Code violations that were “arguably established” on this record. (Maj. opn., ante, p. 274, fn. 4.)
I express no view on whether the election in this case should be set aside under section 20021(c). Such a conclusion would be premature in the absence of factual findings by the trial court on the issue. Each candidate’s involvement in offenses against the elective franchise must be separately examined, because under section 20021(c) a challenge may be sustained only if “the defendant” (i.e., the successful candidate) engaged in such *294violations.7 It is thus possible that some of the elections should be set aside and others should not, depending on whether the particular candidate was a party to violations of the election laws. Accordingly, I would direct the Court of Appeal to remand the matter to the trial court with directions to determine which of the defendants, if any, committed offenses against the elective franchise that would warrant invalidating their election under section 20021(c).
V
The majority speaks at length of the importance of safeguarding the integrity of the electoral process, and this proposition is beyond dispute. But as judges sworn to uphold the law we are not free to safeguard the electoral process in whatever way we think best; we must work within the statutory framework of elections laws. Under those laws, a court may invalidate an election on the basis of illegal ballots only if the challenger produces clear and convincing evidence of how those ballots were cast. In this case, plaintiffs failed to make the required showing, and therefore this one basis for invalidating the election—illegal ballots—is not available.
This conclusion, however, does not mean that an election must be upheld even in the face of pervasive voter fraud. The majority disregards another basis for invalidating an election, one that was pleaded and may well be available in this case: election law violations by the apparent winner of the election. Under the circumstances, the best means of preserving the democratic electoral process, without departing from the statutory framework, is to permit the trial court to determine the unresolved issues concerning the candidates’ responsibility for the election law violations that the trial record has demonstrated.
Appellants’ petition for a rehearing was denied July 15, 1993, and the opinion was modified to read as printed above. Kennard, J., was of the opinion that the petition should be granted.
Unless otherwise stated, all subsequent statutory references are to this code.
This appeal should arguably have been dismissed because of the inadequacy of the appellate record. (See Kearl v. Board of Medical Quality Assurance (1986) 189 Cal.App.3d 1040, 1051 [236 Cal.Rptr. 526]; but see Cal. Rules of Court, rule 52.) As the Court of Appeal noted: “The reporter’s transcript contains selected excerpts from the testimony of three out of approximately twenty-five witnesses. We have only a few of what appears to be approximately 60 exhibits.” Nevertheless, neither the Court of Appeal nor the majority found the record to be inadequate. Accordingly, I shall attempt to analyze the issues on the limited record available.
As relevant, section 20021 provides: “Any elector of a county, city, or of any political subdivision of either may contest any election held therein, for any of the following causes:
“(c) That the defendant has given to any elector or any member of a precinct board any bribe or reward, or has offered any bribe or reward for the purpose of procuring his election, or has committed any other offense against the elective franchise defined in Division 17 (commencing with Section 21900).
“(d) That illegal votes were cast.”
The general rule that ballots must be kept secret (Cal. Const., art. II, § 7) does not apply to illegally cast votes. “[T]he rule is that one who votes illegally forfeits the privilege of secrecy.” (Singletary v. Kelley (1966) 242 Cal.App.2d 611, 613 [51 Cal.Rptr. 682]; see also Patterson v. Hanley (1902) 136 Cal. 265, 276 [68 P. 821 [68 P. 975]; 28 Cal.Jur.3d (rev.), Elections, § 251, Testimony as to How Voter Voted, p. 759.) Thus, in this case the challengers could have called as witnesses the persons who had cast each of the 930 illegal ballots, *290and asked them how they cast their votes. (Canales v. City of Alviso, supra, 3 Cal.3d at p. 128.)
Although there was ample evidence that showed which candidates BAPAC wanted voters to elect, this, in my view, does not constitute evidence of the preferences of the voters themselves. If BAPAC had been running a “slate” of candidates in the election or if VEP workers had consistently told absentee voters whom to vote for, one could perhaps draw the inference that voters agreeing to have their ballots delivered to them by the VEP desired the election of BAPAC’s candidates. As I have explained, however, BAPAC made no official endorsements of any candidates in the election, and the record only shows a few isolated instances in which VEP workers told absentee voters for whom to vote.
If, as the majority asserts, there is sufficient evidence to set aside the elections under section 20024, the majority should, at the same time, declare new winners rather than hold new elections. Section 20087 provides: “If in any election contest it appears that another person than the defendant has the highest number of legal votes, the court shall declare that person elected." If the majority is correct in concluding that it “appears” that the number of illegal votes cast for the prevailing candidates would reduce their vote totals below those of *293other candidates for the same office,” then it should equally “appear” that those other candidates should be declared the winners under section 20087, at least in the districts in which the number of unsuccessful challengers equalled the number of seats available. In the West Park district, for example, there were two positions open, for which there were four candidates. If, as the majority apparently concludes, the prevailing candidates have fewer legally cast votes than the other two, the latter candidates should be declared elected.
In my view (I am unaware of any case that has addressed the issue) an election may also be set aside under section 20021(c) if a person whose actions are directed or ratified by a prevailing candidate engages in such violations.