REDWOOD CITY, Calif. (AP) _ A sheriff who died in April won a June 3 election by a 4-to-1 margin over his security-guard opponent, forcing a special March election, county officials announced Monday.

San Mateo Sheriff Brendan Maguire received 79 percent of the vote, while challenger Jim White had 20 percent, according to results disclosed by county clerk Marvin Church. The ballots earlier had been ordered sealed while the legality of the election was decided in the courts.

The final count was 81,679 for Maguire, who died of a heart attack April 21, to 20,839 for White, a guard at the U.S. Mint. Seven write-in candidates split the remaining 1 percent.

A spokeswoman at White's campaign office, who did not give her name, said he was not immediately available for comment. On Sunday, he said he had been outpolled by Maguire but would run in the special election. He also maintained he was the winner in the June election.

''First of all, there's no he,'' the 31-year-old candidate said of Maguire. ''He doesn't exist anymore. It's simply a mandate from the voters that they want a new election where the issues can be brought out.''

Maguire's supporters accused White of being unqualified for office.

Bill Ward, Maguire's campaign manager and close friend, said the result came as no surprise and shows that local voters realized that White was ''a very poor alternative.''

White was fired from the Dallas County (Texas) Sheriff's Department in 1979 after a newspaper reported that he failed to disclose a juvenile court record. He shot and critically wounded a teen-ager when he was 15.

White originally was charged with assault to murder in that case, but the charge was reduced. A court later determined the shooting was in self-defense.

''If I would have been elected, there would always have been a cloud over me through my entire term (because) someone had died and simply left me the office,'' White said. ''I wouldn't want to operate under that cloud.''

After Maguire's death, county Board of Supervisors asked the Legislature to postponed the election until August, which it did.

But White went to the state Supreme Court, which ruled the election had to take place and ordered the results sealed. Later, the state Court of Appeal ordered the ballots counted, ruling voters had a choice even if one of the candidates was dead.

The court of appeals ruled the Legislature's action unconstitutional and called for a special election in March. Since Maguire's death, Undersheriff Leonard Cardoza has acted as sheriff.

Cardoza has said he would run in the special election with the backing of Maguire's campaign staff.