Sgt. Bowe Bergdahl was caught in the middle of a pot raid on Tuesday while he was on leave in California.

Bergdahl, who spent five years as a captive under the Taliban and was released last year in a controversial prisoner swap, was on leave at the time, Army Times confirmed Friday morning.

"U.S. Army North was contacted by the Mendocino County Sheriff's Office on July 21 regarding an incident within their jurisdiction in which Sgt. Bowe Bergdahl was present," said Lt. Col. Jason Shropshire, a spokesman for U.S. Army North, where Bergdahl is assigned.

Bergdahl was on "authorized leave in California at that time," Shropshire said. "He was not arrested and has returned to his duty station at Fort Sam Houston. He has not been charged with any crime involving his time on leave."

Bergdahl returned to Joint Base San Antonio-Fort Sam Houston on Wednesday afternoon, Shropshire said.

The marijuana eradication team for the Mendocino County Sheriff's Office came across Bergdahl shortly after 8 a.m. Tuesday while serving a search warrant on a home in Redwood Valley, California, said Capt. Greg Van Patten, a spokesman for the sheriff's office.

"This piece of property was identified as having marijuana on there that they believe was being cultivated for commercial benefit," Van Patten told Army Times.

"Several subjects" in the house, including Bergdahl, were detained, Van Patten said. At least one person was arrested.

Bergdahl was not arrested, Van Patten said.

"The investigation at the scene didn't reveal any evidence that connected him to the operation that was going on there," he said.

Investigators confirmed Bergdahl's identity and reached out to the Army, which asked if the sheriff's office would "facilitate [Bergdahl's] return to their control," Van Patten said.

The sheriff's office drove Bergdahl 40 or 50 miles, to a meeting point where he was then met by Army personnel from the Bay Area, Van Patten said.

The house searched by the sheriff's office is in a remote and rural residential area and it sits on "several acres," Van Patten said.

It appears that Bergdahl is friends with the people in the house, he said.

Investigators found about 180 mature marijuana plants growing outdoors on the property, Van Patten said, adding that while investigators found no evidence Bergdahl was involved in any illegal activity, he and anyone else at the house likely would have known about the plants.

"We're under the belief that he would have known what was going on there, just by his presence," Van Patten said. "The activity that was going on there, it would have been obvious to him."

Bergdahl disappeared from Combat Outpost Mest-Lalak in Paktika province, Afghanistan, on June 30, 2009. He has been accused of leaving his patrol base alone and intentionally before he was captured by Taliban insurgents.

He spent five years as a captive under the Taliban before he was freed in a May 31, 2014, prisoner swap that also freed five Taliban leaders from the U.S. military prison at Guantanamo Bay, Cuba.

Bergdahl is now assigned to a desk job at U.S. Army North at Fort Sam Houston.

He was charged March 25 with one count of desertion with intent to shirk important or hazardous duty, and one count of misbehavior before the enemy by endangering the safety of a command, unit or place.

The Article 32 investigation into his case is scheduled to start Sept. 17. The Article 32 will determine if there is enough evidence to merit a court-martial and is often compared to a civilian grand jury inquiry.

The desertion charge, which falls under Article 85 of the Uniformed Code of Military Justice, carries a maximum punishment of five years confinement, a dishonorable discharge, reduction to the rank of E-1, forfeiture of all pay and allowances.

The misbehavior before the enemy charge, which falls under Article 99 of the UCMJ, carries a maximum punishment of confinement for life as well as a dishonorable discharge, reduction in rank to E-1, and forfeiture of pay and allowances.

The case against Bergdahl has presented a challenge for the Army's leadership, which has to decide whether to punish a soldier who spent five years as a prisoner of war or essentially overlook the allegations of misconduct that surrounded his disappearance.