AUGUSTA, Maine — An Oakland man was so sure of who his adult children would vote for in the 2010 election that he cast ballots for them.

The only trouble was that his son voted in person in Orono on Election Day.

Byron L. Wrigley Jr., 50, was sentenced Wednesday in Kennebec County Superior Court to 10 days in jail for forgery, according to a press release issued by the Maine attorney general’s office.

Just before sentencing, Wrigley pleaded guilty to three Class D counts of forgery for signing the name of two other voters on an application for an absentee ballot and two absentee ballot return envelopes.

Superior Court Justice Michaela Murphy is allowing Wrigley to serve his sentence in the county’s alternative sentencing program, which includes participation in a community service project. Information about when Wrigley will take part in that program was not available late Wednesday.

The Maine secretary of state’s office, which oversees voting, uncovered the information that led to the charges using a computer program, Assistant Attorney General Leanne Robbin said Wednesday after the sentencing. The software was installed after Congress passed laws meant to prevent and uncover voter fraud as a result of ballot problems coming to light in Florida and Ohio in the 2000 presidential election.

The program discovered that Jordan Wrigley had voted twice, once in Oakland by absentee ballot and once in Orono in person. Jordan Wrigley, who was a student at the University of Maine, was unaware that an absentee ballot had been cast in his name in his hometown, according the attorney general’s office.

The elder Wrigley also cast a ballot in the name of his daughter, Nicole Wrigley. She did not vote in person in Maine in 2010, according to Robbin.

“This was obviously a huge mistake on Mr. Wrigley’s part and he felt just terrible about it,” his attorney, Walter McKee of Augusta, said Wednesday. “It has been haunting him for months.”

Robbin said Wrigley’s reason for voting on his children’s behalf was to cast ballots for his father, Byron L. Wrigley Sr., 71, who was running for re-election to the Oakland Town Council. Wrigley Sr. was re-elected by a wide margin, the prosecutor said.

“This case serves as a timely warning to voters since absentee ballots will be available any day now for the primary,” Robbin said.

Absentee ballots for the June 12 primary are expected to be available by May 4.

It was the second case of voter fraud prosecuted by the attorney general’s office in the last three years.

Delmer Terrill, then 67, of Newburgh was sentenced in August 2010 in the Penobscot Judicial Center to 12 days in jail for voting twice in November 2009. He pleaded guilty to making a false statement or oath.

Shortly before the November election Terrill moved to Newburgh after having lived in Dixmont for many years, according to a previously published report. He went to the Newburgh town office to register his car and workers there suggested he vote. Terrill, however, had voted in Dixmont before he went to the Newburgh town office.

Terrill’s double voting also was uncovered by the software that found Wrigley’s illegal casting of ballots.