Massachusetts regulators filed a complaint Wednesday against State Street for overcharging clients more than $200 million over an 18-year period.

The office of William Galvin, who is secretary of the commonwealth and the state’s top securities regulator, said State Street Global Markets employees had noted the alleged overcharges for secure electronic messages, known as SWIFT messages, from 2004 through 2015.

“State Street commonly charged out-of-pocket expenses to custodial clients, including pension fund, mutual fund, hedge fund and institutional investors,” according to the complaint.

Charges for SWIFT messages related to payment, securities and trade “were labeled as out-of-pocket expenses, but contained concealed markups as high as 1,900%,” Galvin’s office says. For instance, State Street charged clients $5 per message, though the real cost was $0.25.

“A pattern of overcharging as shown in this and other regulatory actions is unacceptable in a company that controls a state-registered broker-dealer,” explained Galvin in a statement. “My office has the authority to proceed against a registered broker-dealer if its control person has engaged in dishonest and unethical activity … [which] is exactly what we have here, and public policy dictates we act to stop it.”

State Street said in December that it had discovered the “errors” in invoices. “At the same time, we notified a number of governmental authorities, including the Massachusetts secretary of state, of the error, our intent to repay clients and our commitment to make any necessary changes to our billing practices,” the company said in a statement.

“We deeply regret this error and have been in discussions with affected clients and with governmental authorities. We are committed to compensating affected clients fully, including interest. We have been and are also committed to cooperating with governmental authorities.  Given that our internal review is ongoing, we cannot comment any further,” it added.

According to Massachusetts regulators, two clients who questioned their expenses were “assured by State Street that the cost was merely pass-through cost when in fact they were disproportionately higher than the cost that State Street incurred.”

Galvin’s office also drew attention to the indictment of two former State Street executives earlier in April for conspiring to commit securities and wire fraud by adding “secret commissions” to securities trades worth billions of dollars.

In 2014, State Street’s operations in the United Kingdom were fined about $38 million by regulators for charging clients “substantial” markups without their consent.

Specifically, from June 2010 through September 2011, State Street overcharged six clients some $20 million, the regulators said.