A 25-year-old Baton Rouge man was sentenced to two years in prison Friday for computer-aided solicitation of a minor and cultivating marijuana in his Cloud Drive apartment.

State District Judge Lou Daniel also ordered Joseph Justin “Tank” Nowacki to register as a sex offender for the next 25 years.

Nowacki was convicted Oct. 5 of using the Internet to solicit an individual he believed to be a 14-year-old girl.

“It was disgusting behavior that you engaged in,’’ Daniel told Nowacki shortly before sentencing him.

The “girl’’ was actually an undercover investigator from the state Attorney General’s Office High Technology Crime Unit posing as a 14-year-old child, Assistant Attorney General Stephen Martin said.

When investigators searched Nowacki’s apartment relative to the solicitation case last year, they also discovered an enclosed marijuana grow-room with marijuana plants inside, Martin said.

Daniel sentenced Nowacki on the solicitation charge to two years in prison without benefit of probation, parole or suspension of sentence and fined him $1,000.

On the marijuana charge, the judge sentenced Nowacki to a concurrent term of 13 years in prison but suspended all but the first two years. He also ordered Nowacki to be placed on active supervised probation for five years after his release from prison.

Martin said members of Louisiana’s Internet Crimes Against Children Task Force, including the Baton Rouge Police Department, Louisiana State Police and Attorney General’s Office, were instrumental in the investigation.