Nicki Minaj's husband Kenneth Petty has begged a California judge to allow him to use the internet, after barred from doing due to his pending criminal case.

Petty got caught up in legal trouble when he turned himself in to authorities on 4 March after U.S. Marshals indicted him for failing to register as a sex offender following his move to California with Minaj last summer.

The 41-year-old, who was convicted of first-degree attempted rape in his native New York back in 1995, pleaded not guilty to the federal crime and was released on bond but, as he awaits his April trial, Petty pleaded with a judge to allow him to use the internet - which the terms of his pretrial release forbid.

Currently, Petty can't use the web unless approved by a supervisor and, according to papers obtained by TMZ, prosecutors have already agreed to Kenneth's request, meaning it's up to the judge to sign off on the matter.

Petty, who wed the Starships rapper in October, served almost four years in a New York prison for the sex attack.

His undocumented status in California had initially been flagged in November, when he was pulled over by traffic police in Beverly Hills.

At the time, he was taken into custody and charged by local officials, but the state case against him has since been dropped to allow federal authorities to pursue the charge at a higher level, reported Pitchfork.