The federal government has been approving a high number of operations in which agents pose as activists and business people, a new report says. It has led to absurd situations, with undercover agents from different departments investigating each other.

READ MORE: FBI says agent impersonated AP journalist in 2007 sting op

At least 40 government agencies use undercover operatives in the US, with agents pretending to be business people, protesters, doctors, accountants, and welfare recipients, among other things, in order to monitor illegal activity. The information was printed in The New York Times, which cited records and interviews.

In certain cases it is not just one undercover agent investigating a situation, but a whole team of officers. In one example, undercover officers mixed with protesting students in front of the Supreme Court to identify any suspicious activity in the crowd, according to officials close to the case.

The Internal Revenue Service (IRS) uses dozens of such agents, who pretend to be accountants, tax preparers, or even drug dealers to investigate fraud, according to court documents.

The Agriculture Department has more than 100 undercover agents who pose as food stamp recipients, researching any illegal activity, officials revealed.

This trend has been raising red flags from those concerned about the abuses of civil liberties.

“Done right, undercover work can be a very effective law enforcement method, but it carries serious risks and should only be undertaken with proper training, supervision and oversight,” former FBI undercover agent Michael German told the Times.

“Ultimately it is government deceitfulness and participation in criminal activity, which is only justifiable when it is used to resolve the most serious crimes.”

Some of the recent undercover operations have been justified through domestic terrorism fears. However, others targeting low-level crime – such as identity theft – have shown a general crackdown on domestic crime.

The extent of those secret operations within the departments can be so high that it leads to severe overlap, such as one undercover agent investigating an alleged criminal, who also turns out to be a fed on duty, law enforcement officials said.

“There are all sorts of stories about undercover operations gone bad,” Jeff Silk, a longtime undercover agent and supervisor at the Drug Enforcement Administration, said in an interview. “People are always tripping and falling over each other’s cases.”

Silk added that in some instances, agents even draw weapons on each other before realizing they are on the same side.

One such example involved DEA agents trying to infiltrate the same drug ring in Atlanta as the FBI and NYPD officers, who were working on the same case undercover.

READ MORE: No more secretive operations for USAID, State Dept says

Records revealed that agents can even use minors to spot illegal alcohol and cigarette sales, or pose as teenagers in online forums to attract illegal activity. Medicare investigators can go undercover as patients to gather information against healthcare providers.

Documents revealed that undercover work has been reported in organizations such as NASA, the Small Business Administration, and the Smithsonian.

The costs of the undercover activities remain elusive, since the operations are often not revealed to the public.

One intelligence official at the Department of Homeland Security, speaking on condition of anonymity, told the outlet that the agency spends about $100 million annually on undercover operations. Meanwhile, agencies such as the FBI could be spending up to hundreds of millions of dollars a year.