Abdirahman Bashiir’s desire to join the Islamic State and the change of heart that led him to work for the FBI — along with how much they paid him — all fell under defense scrutiny Monday as the federal terror recruitment trial entered its third week.

Attorneys for three Minneapolis men accused of conspiring to join the terror group and to commit murder abroad took turns Monday questioning the co-conspirator turned paid informant whose testimony has spanned more than three days.

“It would be fair to say that the best job you ever had was working as an informant for the FBI,” said Glenn Bruder, an attorney for defendant Guled Omar.

The government objected to the question, but Judge Michael Davis overruled, allowing Bashiir to answer.

“Yes,” the 20-year-old said.

Omar, 21, Mohamed Farah, 22, and Abdirahman Daud, 22, each stand accused of charges that include conspiracy to join the Islamic State in Iraq and the Levant (ISIL) and to commit murder abroad. Six others pleaded guilty in the case and prosecutors say another, Abdi Nur, successfully joined the terror group and remains a fugitive.

Bashiir has testified that he decided to help the government investigate his one-time friends after lying to federal agents and two grand juries, and being “traumatized” by the deaths of four cousins who had previously joined ISIL.

Bashiir told Bruder that before he was paid roughly $119,000 to secretly record conversations among a group of Somali-American friends suspected of trying to go to Syria, his previously highest-paying job was $12 an hour.

Jurors listened Monday to more examples of Bashiir’s work: recordings made in the days before a series of April 2015 arrests in the case. Included were road-trip discussions between Bashiir, Daud and Farah before they were arrested in a warehouse near the Mexican border. Bashiir drove them there to meet an undercover FBI agent he passed off as “Miguel,” a man who could acquire fake passports.

“I can’t believe I’m driving out of the land of the kuffar.” Daud said in the car, using a term for infidels. “I’m going to spit on America ... at the border crossing.”

“All three of us are going to get (martyred) before we even get to training camp,” he added.

Bashiir testified that Daud and Farah told Farah’s younger brother, Adnan, who pleaded guilty last month, to stay behind because there wasn’t enough money to pay for his trip. The tapes revealed that Daud and Farah were also concerned that the Farahs’ mother would disrupt their plans if she learned Adnan had gone missing, although Mohamed Farah was caught on tape saying his mother knew where he was headed.

“She’s going to call everybody and they mommas,” Daud said.

Inside the California warehouse, after exchanges were made for the passports, Miguel stepped away before agents set off flash-bang grenades and arrested the men at gunpoint. Bashiir said he was instructed to fake an injury so he could be separated from the two while being looked at by medics.

Anxiety attack

On cross-examination, Bashiir explained how his mind-set evolved from entertaining radical thoughts to later concluding that ISIL misrepresented Islamic teachings to fit its brutal agenda.

“At one point I was radical,” he conceded.

Farah’s attorney, Murad Mohammad, asked Bashiir if it ever occurred to him to try to talk his friends out of making another attempt to get to Syria instead of helping the government build its criminal case against them.

Bashiir replied by naming each of the three defendants seated before him and said he believed nothing he could have said would have changed their minds.

“They would have said ‘You’re against the brothers,’ ” he said.

Davis intervened twice during cross-examination, first after multiple attempts by Mohammad to ask Bashiir if he regretted not doing something other than working with the FBI and later after Bruder and Bashiir talked over one another during questioning.

Bashiir began Monday’s testimony by breaking down on the stand after being asked to recount how his 2015 turn from co-conspirator to informant resulted in hospitalization for anxiety.

“A lot of the community members would say ‘This guy is after us,’ ” Bashiir said. “Even some of my family members would tell their kids, my cousins, to stay away from me.”

Later, in his testimony to Mohammad, Bashiir also seemed aware of defendants’ families and supporters arguing that his involvement in the case has amounted to entrapment.

“An entire community points the blame at me,” Bashiir said. “Everyone thinks it’s my fault but all I did was tell the truth.”

Cross-examination is scheduled to resume Tuesday morning.