ANCHORAGE, Alaska -- An informal adviser who has counseled Gov. Sarah Palin on ethics issues urged her in July to apologize for her handling of the dismissal of the state's public safety commissioner and warned that the matter could snowball into a bigger scandal.

He also said, in a letter reviewed by The Wall Street Journal, that she should fire any aides who had raised concerns with the chief over a state trooper who was involved in a bitter divorce with the governor's sister.

In the letter, written before Sen. John McCain picked the Alaska governor as his running mate, former U.S. Attorney Wevley Shea warned Gov. Palin that "the situation is now grave" and recommended that she and her husband, Todd Palin, apologize for "overreaching or perceived overreaching" for using her position to try to get Trooper Mike Wooten fired from the force.

Mr. Shea was acting on his own in writing the letter, with no official capacity. In late 2006, Gov. Palin asked him to co-write an ethics report for Gov. Palin with then-House Democratic leader Ethan Berkowitz that recommended new financial-disclosure rules for elected and appointed officials in the statehouse. That report served as a key document for the ethics bill she later signed into law.

After his initial letter in July, Mr. Shea followed up with another letter, dated Aug. 4, in which he told Gov. Palin that she probably couldn't legally shun a legislative investigation into the firing of Public Safety Commissioner Walt Monegan.