A close friend of President Barack Obama pleaded no contest on Monday to soliciting a prostitute in Hawaii.

An attorney for Robert "Bobby" Titcomb entered the plea a month after Honolulu police arrested Titcomb during an undercover sting operation.

Titcomb, 49, didn't appear in the Honolulu courtroom.

"He doesn't fully agree with the facts of the case," said his attorney William Harrison, but "he's going to take full responsibility for his actions in this matter."

The judge granted Harrison's request for a deferral. That means the case will be dismissed in six months if Titcomb stays out of trouble. He must also pay a $500 fine and make a donation to a criminal injury compensation fund.

Honolulu police arrested Titcomb and three other men on April 4 during an undercover operation.

Titcomb attended Punahou School in Honolulu with Obama in the 1970s. The two have often played golf and basketball and headed to the beach together when the president has been back in the islands for vacation.

Obama has also visited Titcomb's beachside home, about an hour outside downtown Honolulu on Oahu's North Shore, for barbecues during the past few years.