Brittney Griner, the detained American basketball star, pleaded guilty to drug charges in a court near Moscow on Thursday, according to her lawyer.

“I’d like to enter a guilty plea, your honor.” However, there was no intention. “I didn’t want to break the law,” Ms. Griner said in English, which Reuters translated into Russian.

Ms. Griner has been detained in Russia since February 17, accused of having a vape cartridge containing hashish oil in her luggage at an airport near Moscow.

Her lawyer, Aleksandr Boikov, stated that the cartridges appeared in Ms. Griner’s luggage “due to carelessness.”

“She pleaded guilty, emphasizing that she was carrying prohibited substances in Russia unintentionally because she was packing quickly,” Mr. Boikov said.

Ms. Griner faces up to ten years in a Russian penal colony if convicted. Ms. Griner is still facing formal conviction and sentencing proceedings, with her next court appearance scheduled for July 14.

Her guilty plea came just hours after a top Russian diplomat blasted the Biden administration for “fomenting hype” in her case.

Watch this video: Brittney Griner’s politically charged trial has begun.

The Russian diplomat, Sergei A. Ryabkov, the deputy foreign minister, said that the media coverage of the case was not helping Ms. Griner, whom American officials say is essentially a hostage taken by President Vladimir V. Putin in the run-up to the Ukraine war.

Mr. Ryabkov indicated that Moscow was willing to negotiate her fate, but only after the court ruled on the drug charges brought against her.

“We have a long-established form of discussing these matters,” Mr. Ryabkov told reporters in Moscow on Thursday, according to Interfax. “While the American side’s efforts to create hype and make noise in the public sphere are understandable, they do not help to practically resolve issues.”

Ms. Griner wrote Mr. Biden a handwritten letter after her trial began last week, pleading with him not to “forget about” her and other American detainees around the world.

According to a White House statement, Mr. Biden and Vice President Kamala Harris spoke with Ms. Griner’s wife, Cherelle Griner, on Wednesday.

According to the statement, the president read a draft of a letter that he planned to send to Brittney Griner during the call. He also stated that his administration was looking into “every avenue” to bring Brittney home.

Elizabeth Rood, the chargé d’affaires at the US Embassy in Moscow, said she spoke with Ms. Griner and was able to read the president’s letter outside the courtroom on Thursday.

“She said she’s eating well, she’s able to read books, and she’s doing well under the circumstances,” Ms. Rood said in a video posted on Twitter by an NPR correspondent. “I would like to emphasize again the commitment of the United States government at the highest level to bring Ms. Griner and all U.S. citizens wrongfully detained home safely,” she added.

Cherelle Griner has publicly expressed her dissatisfaction with Mr. Biden and his administration’s efforts to free her wife.

Cherelle Griner said in a statement to The New York Times on Wednesday that she was grateful to Mr. Biden and Ms. Harris “for the time they spent with me and the commitment they expressed to getting B.G. home.”

Brittney Griner has been classified as “wrongfully detained” by the US government, and the government is working to secure her release regardless of the outcome of the trial. While the Kremlin denies any involvement in Ms. Griner’s case, Russian state media reports suggest that Moscow may press the US to release a Russian detained in the US, such as convicted arms dealer Viktor Bout, in exchange for her release.

Mr. Ryabkov stated that “there are no formal procedural grounds” to discuss further steps until the conclusion of Ms. Griner’s case. He did, however, imply that Moscow was interested in negotiating her fate, claiming that “a serious reading by the American side of the signals that they received from Russia, from Moscow, through specialized channels” would help her.

He did not specify what those signals were, but insisted that talks on Ms. Griner’s fate should take place out of the public eye, according to Russian news reports.