A Grammy-nominated rapper has been sentenced after admitting to exposing himself and masturbating on a flight from Tokyo to the Twin Cities.

Sidney Selby III, who performs under the name Desiigner, pleaded guilty in U.S. District Court in Minneapolis to misdemeanor indecent conduct in connection with his actions while returning on April 17 from a Far East tour on a Delta Air Lines flight.

Selby's sentence calls for two years' probation, a $500,000 fine and 120 hours of community service.

Desiigner is best known for his debut single "Panda," which topped the U.S. Billboard Hot 100 in 2016 and earned him a Grammy nomination.

Defense attorney Ryan Garry contended in a filing to the court ahead of sentencing that "dehydration, exhaustion from the music tour and travel, the marijuana he ingested, and the medication he received from [a] Thailand hospital, all in combination, contributed in some way to the poor decisions Mr. Selby made on that airplane."

While prosecutors acknowledged that Selby has mental health and substance abuse challenges, they made it clear in their pre-sentence argument that his "conduct aboard the flight caused negative real-world effects on the flight attendants who witnessed his actions in the workplace, where they should be kept safe."

The prosecution also pointed out that Selby was banned from Scandinavian Airlines for a year after he "behaved in a threatening manner toward the crew" during a flight in 2018 after a flight attendant felt it necessary to "put hands on him."

According to the complaint:

Sixty to 90 minutes after takeoff, a flight attendant in first class saw that Selby had exposed himself. She told him "no," and he covered himself up.

About five minutes later, the first flight attendant and a colleague saw that Selby had exposed himself again. The second attendant admonished him, and he covered himself up again.

However, Selby exposed himself to the first flight attendant again just moments later. She handed him a card that said his behavior "appears to be in violation of federal law." In response, he apologized.

The flight attendants directed Selby to the back of the plane, where two travel companions were seated and agreed to monitor him. He also apologized to the plane's staff at the end of the flight.

While detained, Selby told the FBI agent he was returning from Japan and "didn't really get much" sex. He said he exposed himself the first time after being aroused by one of the flight attendants, and he acknowledged repeating the act.