The U.S. Army is set to decide whether Pvt. Bowe Bergdahl is entitled to as much as $300,000 in back pay and other benefits he amassed during his captivity with the Taliban.

Bergdahl, 31, was captured by the Taliban in 2009 after he walked off base while in Afghanistan. He was given a dishonorable discharge and he was demoted from sergeant to private in a court decision earlier this month but spared prison. President Trump called the ruling a "complete and total disgrace."

Captive soldiers normally receive special compensation worth around $150,000 in addition to hostile-fire pay and their basic pay they accumulated during the captivity. But determining whether Bergdahl should receive the back pay is not as clear-cut.

The State Department marked Bergdahl in as "Missing-Captured" several days after he was captured and the terror group released a video featuring him alive, Military.com reported in 2014.

But Bergdahl pleaded guilty to desertion in court, complicating whether the army will consider him as a prisoner of war and thus entitled to back pay and compensation.

"My understanding is there has to be an administrative determination of his duty status at each point, from the time he was captured until now," an army official told the Army Times. "In order to figure out what he's owed, you're basically going to have to start from that point of captivity."

The official told the Times that it is possible Bergdahl will be given only his accumulated basic pay during his five-year captivity.

Bergdahl, however, might not be eligible for the basic back pay and could even owe money to the military. The Army could determine that he should not be paid for the time in captivity or that he was overpaid since his return to the U.S, according to the official who spoke with the Times.

"Based upon the results of trial, the Army is reviewing Sgt. Bergdahl's pay and allowances," Lt. Col. Randy Taylor told the Times. "His final pay and allowances will be determined in accordance with DoD policy and Army regulation."

The Associated Press contributed to this report.