A CIA programmer accused of passing classified information to Wikileaks became increasingly hostile toward coworkers in the months ahead of a massive online document dump, a witness said in court Wednesday.

The software engineer, Joshua Adam Schulte, 30, forced himself into meetings he wasn’t invited to, referred to a woman higher-up as a “dumb b—h,” and fueled a nasty, escalating feud with a coworker, according to the witness in Manhattan federal court.

“Josh became increasingly belligerent to another employee,” said the witness, a colleague who testified under the pseudonym “Jeremy Weber” in order to protect his identity.

That fight was cultivated in what Weber described as shockingly lax work culture, where government hackers responsible for top-secret spy projects traded childish barbs and shot off Nerf guns at the secretive, austere administration.

Prosecutors are seizing on the dispute between Schulte and the coworker, identified only as Amol, in an attempt to paint Schulte as a disgruntled hacker seeking retaliation for workplace slights.

As they developed software to help uphold national security, workers in Schuttle’s unit would goof off by swiping and hiding items from workers’ cubicles, Weber testified

But bad blood formed amid the hijinks between Schulte and Amol — with each casually trading personal insults about the other’s physical appearances, Weber said.

The disputes between Schulte and Amol escalated to the point where Schulte eventually filed a restraining order against Amol, according to Weber.

Schulte was then transferred to a different cybersecurity unit altogether. But Weber said he became increasingly difficult and continuously logged back into systems he was no longer supposed to have access to.

In March 2017, about a year after Schulte began complaining about Amol, Wikileaks published a massive dump about CIA malware and other virus projects code-named “Vault 7” and “Vault 8,” to which prosecutors believe Schulte contributed.

At that point, Weber had distanced himself from Schulte, whom he once considered a friend.

“I didn’t want to deal with the drama around him anymore,” Weber said.

Schulte is charged with the illegal gathering of national defense information and other counts and faces up to 135 years in prison if convicted.