WASHINGTON — The federal government pays millions of dollars in farm subsidies each year to farmers who have died, because the Agriculture Department lacks the proper controls to make sure the money it sends is going to the right people, a government audit has found.

The Government Accountability Office, the investigative arm of Congress, said the problem involved several agencies within the department.

The Natural Resources Conservation Service, which oversees the Agriculture Department’s conservation programs, sent out $10.6 million in payments between 2008 and 2012 to more than 1,000 people who had been dead for more than a year, according to the report.

The Risk Management Agency, which administers the crop insurance program, paid $22 million to more than 3,400 policyholders who had been dead for at least two years. The G.A.O. said that some of those payments might have been made while the farmer was still alive, but that there was no way to know for sure.