Maine’s Department of Health and Human Services accidentally mailed confidential information from 31 applications for public assistance to random addresses in its database because of an error in its computer system.

The 39 mailings, some of which included applicants’ Social Security numbers and bank account information, went out over a seven-month period starting in December — a month after the department began accepting applications online, according to DHHS officials.

Information from some applications was sent to multiple addresses, said Dale Denno, director of the Office for Family Independence, which reviews public assistance applications.

Since confirming last week which applicants were affected, the department has reached almost all of them by phone, Denno said. None reported having identity-theft or credit issues.

DHHS Commissioner Mary Mayhew issued a statement Thursday apologizing “to those whose information was mishandled and to those who inadvertently received it.”

She said, “Keeping personal information secure is and always has been our highest priority.”

Denno said DHHS learned of the problem in June, when someone who received the information by mistake notified the department.

The information technology staff determined that, on occasion, applications that were supposed to go into the computer system’s storage file were filed instead with letters to be mailed, said Mike Frey, deputy director of the Office for Family Independence.

The applications “were never intended to be documents that were sent out to anybody,” he said.

Several pages of applicants’ personal information was stuffed into envelopes along with letters from the department that were meant for the people who received them.

“It sounds like there was a command or something that under very specific circumstances — and I don’t know what those are — resulted in this information getting disseminated,” Frey said.

After the department found and fixed the cause of the problem, it determined that a total of 79 people had been affected, as some applications included multiple members of a household.

Frey said the incident was not related to the computer problems in the department, exposed in March, that gave Medicaid benefits to thousands of Maine residents who weren’t eligible to receive them.

Denno said the confidential information that was mailed out came from 24 new applications for public assistance and seven recertification forms, which recipients must submit annually to continue getting benefits.

DHHS started accepting recertification forms online in May, Frey said.

The applications were for food supplements, MaineCare, Temporary Assistance for Needy Families or combinations of those benefits, Denno said.

He said there’s no apparent common thread among the people whose information was exposed or among the recipients, who live in all areas of the state.

DHHS sent letters to the people whose information was exposed, offering free identity- and credit-protection services, Denno said. He didn’t know how many have opted to use them, but said many expressed interest in doing so.

He called the situation “very embarrassing.”

Letters also went out to the people who received the information in error, asking them to mail it back in postage-paid envelopes provided by the DHHS and letting them know they are legally obligated to do so.

Denno didn’t know Thursday whether anyone had returned documents to the department. He said Mayhew has formed a team of DHHS employees to look at ways to keep information secure in the future.

Denno wouldn’t provide the names of any of the applicants who were affected, saying they’re confidential.