The state Department of Financial Services says it will investigate salary spiking in the state’s pension funds and potential conflicts of interest among consultants used to oversee the funds, among the largest in the country.

Benjamin Lawsky, the agency’s commissioner, wrote in letters this week that the agency would audit the public-pension funds. The letters went to the New York City pension fund, the state pension fund and the New York Teachers’ Retirement System.

“These are huge funds that provide for the retirement of millions of New Yorkers. And they are supported by billions of dollars in taxpayer money,” Lawsky wrote. “Indeed, the recent financial difficulties in Detroit serve as a stern wake-up call, demonstrating why strong oversight of New York’s public-pension funds is so important.”

In 2011, the state insurance and banking department were combined into the state Department of Financial Services. The Insurance Department was the regulator for the state’s public pension systems.

Lawsky wrote that the agency would investigate whether current pension procedures are rooting out salary spiking — the practice through which employees get significant overtime and salary increases in their last year before retirement to boost their pensions.

The state Comptroller’s Office, which controls the state pension fund, acknowledged that it had received the letter but declined to comment. There was no immediate comment from the Teachers’ Retirement System.

E.J. McMahon, president of the Empire Center for Public Policy, said Lawsky’s boss, Gov. Andrew Cuomo, could stamp out pension padding by reforming state laws that deal with union contracts. McMahon and other fiscal conservatives want the state to repeal a law that lets union contracts continue even after they expire.

“Cuomo could minimize spiking for all current workers by trying to make it easier for counties and municipalities to restructure contractual work rules that drive up overtime,” McMahon wrote Thursday on his blog, The Torch.

Lawsky indicated in July that he would investigate the pension funds. He released a scathing audit in August that accused the Comptroller’s Office of using a computer system for the $160 billion pension fund that dates back to 1959; Comptroller Thomas DiNapoli disputed the charges.

Pension costs have soared in recent years, putting a strain on the budgets of schools and municipalities. The Teachers’ Retirement System is increasing pension expenses by nearly 40 percent next year. Next year, the state and local governments will see a slight reduction in their pension contributions for the first time in five years.