Mr. Kilgore said his resignation will be effective Feb. 1. If Mr. Kilgore had stepped down after the legislative session adjourns on Feb. 26, Gov. Mark Warner, a Democrat, would have been able to appoint a replacement.

Mr. Kilgore said he stepped down now to fully focus his attention on his gubernatorial candidacy.

“I will devote my time and energy now to another goal,” Mr. Kilgore said. “The voters elected me attorney general; they chose a Republican to serve in that office. Who knows who [Mr. Warner] would have appointed.”

At a press conference yesterday, Mr. Kilgore introduced Mrs. Jagdmann, a Republican who said she is ideologically in line with Mr. Kilgore.

“I will be endorsing her wholeheartedly,” Mr. Kilgore said.

Mrs. Jagdmann, who originally is from Lee County in Southwest Virginia, now lives in Richmond and has served in the Attorney General’s Office for seven years under Mr. Kilgore and former Attorney General Mark L. Earley.

She has worked on utility and deregulation issues. Before coming to the Attorney General’s Office, Mrs. Jagdmann served 12 years as counsel at the State Corporation Commission, which regulates Virginia businesses and industries.

Lt. Gov. Timothy M. Kaine, a Democrat who is expected to challenge Mr. Kilgore in the November election, yesterday criticized the attorney general for stepping down, saying it was a “demonstration of poor leadership.”

“He took the same oath that I took,” said Mr. Kaine, who pledged yesterday he will not leave office to campaign. “We still have got work to do.”

Virginia law forbids candidates from fund raising while the legislature is in session. Once Mr. Kilgore leaves office, he can raise funds through next month. Mr. Kaine, who serves as president of the Senate, cannot raise funds until the session adjourns.

“Him having an extra month on the trail is a little obstacle for us,” Mr. Kaine said.

Mr. Kilgore said he was following in the tradition of past attorneys general stepping down before running for governor. Mr. Earley, a Republican who ran against Mr. Warner in 2001, stepped down in June of that year.

Former Gov. James S. Gilmore III, a Republican, stepped down as attorney general in June 1997 to campaign for governor.

Mr. Kaine said he suspects the announcement was made this early in the year because of the fund-raising reports that were made public earlier this week.

The two candidates are neck-and-neck in donations. Mr. Kaine raised more than $5.3 million and Mr. Kilgore had just under $5.4 million by the end of last year.

Mr. Kaine’s fund-raising figure does not include a recent pledge from the Democratic National Committee to donate $5 million over the course of his campaign.

Mr. Kilgore said he will be fund raising once he leaves office. He has accepted a position with the Williams Mullen law firm in Richmond.

“Virginia needs an attorney general who can fully focus on this office,” Mr. Kilgore said. “It’s the right thing to do.”

Mr. Kaine was mayor of Richmond in 2001 when he resigned from the City Council 60 days before the statewide election that year. Mr. Kaine was elected lieutenant governor that November.

Mr. Kilgore’s decision followed months of debate within his inner circle about the timing of his departure, aides within Mr. Kilgore’s office and his campaign told the Associated Press.