( BBC ) - US Senator Larry Craig has said he will not resign, after a judge refused to withdraw his guilty plea for allegedly seeking gay sex in an airport toilet.
Mr Craig said he would serve out the rest of his term, which ends in January 2009, but would not seek re-election.
Under pressure from party officials, the Republican senator for Idaho initially said he would resign from Congress on 30 September.
But Mr Craig then hinted that he might stay on after launching the appeal.
However, his appeal has now been denied, with a judge ruling that Mr Craig's guilty plea to a charge of disorderly conduct was "accurate, voluntary and intelligent".
Mr Craig, 62, said he hoped to clear his name in the Senate Ethics Committee, which is only possible if he is still serving in the Senate.
The committee is reviewing the case on the request of Senate Republican leadership.
"When my term has expired, I will retire and not seek re-election," Mr Craig said.
"I hope this provides the certainty Idaho needs and deserves."
Earlier on Thursday, Hennepin County Judge Charles Porter ruled that Mr Craig's conviction was valid and supported by evidence.
"Because the defendant's plea was accurate, voluntary and intelligent ... the defendant's motion to withdraw his guilty plea is denied," Mr Porter wrote in his decision.
He added: "The defendant, a career politician with a college education, is of, at least, above average intelligence.
"He knew what he was saying, reading and signing."
Mr Craig was arrested on 11 June by an undercover police officer at Minneapolis-St Paul airport for allegedly soliciting gay sex in an airport toilet.
Police say he made hand and foot gestures often used as signals "by persons communicating a desire to engage in sexual conduct".
He says police misconstrued his actions.
The three-term senator, who has represented Idaho for 27 years, has a record of hostility to gay rights and is a married father-of-three.
He insists he is not homosexual.